-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
[accessibility] Consider replacing aria-pressed
with aria-expanded
on the attribution control
#359
Comments
@Malvoz Great that you looked at a11y improvements. Regarding Wouldn't MapLibre use the HTML elements Original with
|
@astridx that's true, HTML is preferred over ARIA where possible. For example, markers should ideally be |
Do you think this aria-pressed with aria-expanded change may have broken the attributions when in full screen? I am testing the Terrain3d branch that is being worked on here ( https://github.com/prozessor13/maplibre-gl-js/commits/terrain3d ) and notice my attributions are no longer showing when in full screen (or above a width of about 615px). they show properly as a button when the screen is smaller (below 615px), but full screen they don't show at all. Looking at the change log I think it might have started when the main branch with this change was merged in. Latest version at above 615px, missing attributes Latest version below 615px, the attributes show up as a button like they should This is how it looked when it was working on the previous version (which i compiled 10/19) above 615px, all my attribution show as a list at the bottom, until the screen gets below a certain size (around 615px) and it turns into a button |
I tested reverting the changes in attribution_control.ts here and it does in fact fix my full screen attribution issue |
Regarding:
maplibre-gl-js/src/ui/control/attribution_control.js
Lines 102 to 110 in 0c6ead3
aria-pressed
is similar toaria-expanded
in that it indicates the state of the button, butaria-expanded
is more appropriate as it specifically:The distinction is that with
aria-expanded
the (non-visual) user will expect other ("new") content to be available after pressing the button. This is mostly important as there is no focus delegation (which is fine if it's conveyed to the user that new content is available througharia-expanded
).(The same issue was also reported with MapBox: mapbox/mapbox-gl-js#11034.)
The text was updated successfully, but these errors were encountered: