-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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] Attribution container should not have role="list"
(or should have listitem
children)
#11033
Comments
Hi @Malvoz, thanks so much for your time! It seems to me that this specific accessibility issue is already set up correctly. Please correct me if I am misunderstanding. The role='list' attribute is set on the attribution container as a whole. When I go to inspect (on Chrome and Safari), the attribution links have the role listitem. Here are two screenshots from inspecting the attribution container element. |
I actually don't recall seeing any It should rather be: Alternatively don't use a list (the benefit of using a list is that screen readers will announce the number of list items in the list). |
I'm interested in solving the little issue here. Could you assign it to me? I am a first timer by the way. |
It would be great to get this resolved! Noted accessibility expert @marcysutton caught this issue in a recent video review of a site using Mapbox. As @Malvoz notes, overriding the default semantics of a link is a bad idea, and it doesn't seem like these really need to be in a list. (If they did, you could also put them in a real list!) Looking at this Mapbox demo, I could not find anything with If @Catalyst497 is still willing, maybe someone could assign them this task and fix this!? |
@mrwweb @Catalyst497 @Malvoz 1. Remove role="list" 2. Remove role="listitem" As a quick fix, I can just remove I made a draft PR based on the quick fix suggestion for now. |
👋 @kumiko-haraguchi Thanks for the ping. I can handle those attributes in the TileJSON documents. Want to simplify that draft PR and assign a review from me? |
Hi @tristen 👋 |
Fixed in #12857. |
mapbox-gl-js/src/ui/control/attribution_control.js
Line 64 in 36533f3
The attribution links should either be children of list items (
role="listitem"
) orrole="list"
should be removed.See motivation in https://dequeuniversity.com/rules/axe/4.2/list?application=RuleDescription (describes
<ul>
and<li>
requirements, the same is applicable to the equivalent ARIA roleslist
andlistitem
).The text was updated successfully, but these errors were encountered: