-
Notifications
You must be signed in to change notification settings - Fork 16
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
<g> element <path> children's <title> values are not read #332
Comments
Update: aria-label seems to work in Chrome but not in FireFox (with NVDA) . |
I think the reason that there were issues with the <title> element was because it was being created with document.createElement. So I believe this PR fixes the screen reader issue. |
While the PR did fix the screen reader issue, mostly, it didn't fix it for the first path in the group; at least, you have to tab past the first path and then shift-tab to it, and then it is read. But it's better than it was. If you have an idea about how to solve this latter problem, please comment. I'll close this issue for the time being. Of note is that this latter problem exists in both Chrome and Firefox. |
Screen readers seem to have problems with nested interactive elements (map features are nested interactive elements inside If Setting |
Leaflet renders vector info as SVG
<path>
s, which it groups into a single<g>
element. Each feature you create is rendered as a path inside that<g>
, and we have successfully added a<title>
to each one, anticipating that it might be read by screen readers.While the "g" is announced (on chrome, "blank" on FireFox) for each
<path>
inside the<g>
, the path's<title>
value doesn't get read. If I remove the<g>
in devtools (re-parenting the<path>
s to be children of<svg>
) , both "g" and the<title>
value are announced (using NVDA in Chrome. I tried that trick with FireFox but the tab crashed). Is there some way to convince screen readers to look inside a group for path titles ?I think @shepazu may have already written the answer to this in blog post form:
<path aria-label="accessible name"...>
attribute instead of (as well as??)<path><title>
cc @Malvoz
The text was updated successfully, but these errors were encountered: