-
Notifications
You must be signed in to change notification settings - Fork 144
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
Conversation
<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 }}" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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.
Types of changes
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
Accessibility Checklist
Developer Guide
Ticket Background
Testing instructions
See archesproject/arches-references#16 as an example consumer of this.