Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ACCESSIBILITY_MODE on base-root.htm #11326 #11327

Closed
wants to merge 1 commit into from

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Aug 12, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Before, only the base.htm template had knowledge of the 7.5 setting ACCESSIBILITY_MODE, and a vue app consuming that template had to query the <link> tags for a hardcoded stylesheet name, which could theoretically be overridden.

Now, Vue apps inheriting from either template can query the <body> tag for this information in a stable way.

Targeting 7.6 as this is needed to avoid a regression in a 7.6 feature (base-root.htm)

Issues Solved

Closes #11326

Checklist

  • I targeted one of these branches:
    • dev/7.6.x (under development): features, bugfixes not covered below
    • dev/7.5.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Accessibility Checklist

Developer Guide

Topic Changed Retested
Color contrast
Form fields
Headings
Links
Keyboard
Responsive Design
HTML validation
Screen reader

Ticket Background

Testing instructions

See archesproject/arches-references#16 as an example consumer of this.

<body dir="{{ app_settings.ACTIVE_LANGUAGE_DIR }}" {% block body_attributes %}class="scroll-y-auto"{% endblock %}>
<body
dir="{{ app_settings.ACTIVE_LANGUAGE_DIR }}"
accessibility-mode="{{ app_settings.ACCESSIBILITY_MODE }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the plan on consuming this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that much of an improvement, but it avoids checking a hard-coded stylesheet name: archesproject/arches-references@8fb0c0b.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! Is shouldUseContrast still going to be used once basic theming is stubbed out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless/until we get buy-in to deprecate that recently added setting, I think projects will still want a way to switch between theming that uses more colors versus theming that passes WCAG AA color contrast with a much more restricted palette. Happy to chat offline if you have other ideas!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just documenting here the result of our conversation yesterday: Since theming/theme-switching is being moved into core, likely the entire interaction could take place within a different pattern than this. From my understanding we're pausing this until that lands 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, will close PR but won't delete the branch just yet in case we decide we want to demo this for any reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inform base_root.htm template about ACCESSIBILITY_MODE
2 participants