-
Notifications
You must be signed in to change notification settings - Fork 51
Upgrade ember-a11y-refocus
to v5.1.0
#3234
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
base: main-5.0.0
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
we need to bring it styles manually now as addon it self now v2 which means styles will not be auto included https://github.com/ember-a11y/ember-a11y-refocus?tab=readme-ov-file#usage also my comments on original PR is still valid #2950 (comment) |
ember-a11y-refocus
to v5.1.0
The addon has classes & Ember should let you add your own class when you invoke the component, so the styles shouldn't be an issue, even if usage has slightly changed out of necessity. I think your preferred solution is fine, honestly. I don't plan to change the styles, it's one of those things that is meant to be as barebones as possible so folks can use the classnames in their apps if they want to change things to match their own visual presentation styles.
the navigation text should still be a string. Do you mean |
📌 Summary
This PR upgrades
ember-a11y-refocus
tov5.1.0
, which required a few related dependency, type, and style updates to ensure everything compiles and functions correctly.Changes
@glimmer/component
tov2.0
EmberA11yRefocusRegistry
to correctly import type signatures forNavigationNarrator
.NavigationNarrator
would remain untyped.package.json
to forcev2.0.0
. This prevents build failures in Showcase and Website caused by mismatched versions.@a11yRefocusNavigationText
argumentsSideNav
andAppHeader
, this arg was previously typed asstring
.(transition: Transition) => boolean
since it is forwarded to theNavigationNarrator
component.Owner
typing inth-resize-handle
@glimmer/[email protected]
throws ifOwner
is not typed correctly.Owner
being typed asunknown
.NavigationNarrator
styles to Website CSS[email protected]
no longer auto-imports its styles for the website nav.website/ember-cli-build.js
andwebsite/app/styles/app.scss
following the recommended usage.Open discussion
There is still a question around what is the best way to handle the
ember-a11y-refocus
styles. Before, the way the build worked made it so the consumer would installember-a11y-refocus
by installing the design system and that would implicitly import the styles. This is no longer the case, so either we need to export the styles for them or they need to manually import them.In this instance, we can treat the showcase app as a demo consumer of the design system. The easiest way to verify that the styles are imported are to check the SideNav skip link example in the showcase. If the link has an underline, the styles are not imported.
The solution in this PR is Lee's preference
Ultimately, the main style we need is
text-decoration: none
and ember-a11y-refocus is not likely to change the styles frequently so I think it is reasonably safe to copy their styles and include them in our exported stylesheet.Option 2: Require all consumers add
ember-a11y-refocus
as a dependencySPIKE PR: #3251
In this option, we don't export the ember-a11y-refocus styles so the consumer has to include the path in their ember-cli-build and add it as a dependency. This approach is similar to how the tokens styles work.
This would require all consumers to update their ember-cli-build file and we'd have to change the guidance on our website. If you don't do this, the design system package builds fine, but the showcase fails to build because it does not have access to the stylesheet.
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.