Skip to content

Add empty alt text for dl.switch > dt::marker content - #511

Merged
zcorpan merged 2 commits into
whatwg:mainfrom
6TELOIV:main
Sep 24, 2026
Merged

zcorpan merged 2 commits into
whatwg:mainfrom
6TELOIV:main

Conversation

@6TELOIV

@6TELOIV 6TELOIV commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #260

This PR adds an empty alt text to the marker content for the switch definition list markers. This should make screen readers skip announcing "Left Arrow Curving Right" for every list item.

What I've tested:

  • Windows Narrator: Pass
  • Android TalkBack: Pass
  • Linux Orca: Fail -- it still announces "Left Arrow Curving Right"; so not a regression but no improvement

It would be good if other people using JAWS or NVDA tested as well before closing the issue, as they are much more common screen readers.

@zcorpan

zcorpan commented Sep 24, 2026

Copy link
Copy Markdown
Member

Which browser did you test in each case? Computing the accessible name happens in the browser a11y tree.

This is covered by https://w3c.github.io/aria/accname/#computation-steps 2.6.2.1:

For ::marker pseudo elements, User agents MUST prepend CSS textual content, without a space, to the textual content of the current node if the current node supports ::marker.

But it's not clear to me that "CSS textual content" means to use the alt text if present. There's an issue at w3c/accname#253

It's tested in https://wpt.fyi/results/accname/name/comp_name_from_pseudo_content_marker.tentative.html , Gecko fails the alt cases for ::marker. Filed https://bugzilla.mozilla.org/show_bug.cgi?id=2075119

@zcorpan
zcorpan merged commit ee410f5 into whatwg:main Sep 24, 2026
1 check passed
@6TELOIV

6TELOIV commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@zcorpan On Linux, I believe I only tested Firefox. I'll try again this evening in Chromium as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

<dl class="switch"> styling is not optimal for screen reader users

2 participants