Skip to content
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

TTS : aria-labelledby and aria-describedby not read #1933

Open
civodulab opened this issue Mar 22, 2023 · 7 comments
Open

TTS : aria-labelledby and aria-describedby not read #1933

civodulab opened this issue Mar 22, 2023 · 7 comments

Comments

@civodulab
Copy link

Hello,
Only the aria-label is read ?
And in an SVG only <title> is read, the <desc> tag is not read.

@danielweck danielweck added the TTS label Mar 22, 2023
@danielweck
Copy link
Member

Hello, thank you for reporting this.
For SVG islands inside (X)HTML documents, Thorium uses the value of the aria-label attribute (if any) located on the root element of the SVG fragment, or fallback on the first title child element found beneath the first-descendants level (i.e. not recursively, just the top-level graphical shapes). Currently the desc tag is not supported. If I understand correctly, both title ( https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title ) and desc ( https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc ) attributes can appear multiple times in the SVG descendants, as they apply to specific graphics/shapes within the SVG sub-tree. Without an authored aria-describedby that concatenates specific referenced text (e.g. title, followed by description of a particular shape), I think Thorium can reasonably continue to pick the first available title / desc value (i.e. not to aggregate all available text in the SVG tree). So I suppose the order of precedence should be: aria-label (single line of text), aria-describedby (possibly multiple lines of text), or otherwise a fallback to title (first only) and/or desc (first only).
Does this sound good?

@danielweck
Copy link
Member

Note that for images (i.e. the img HTML element) Thorium only selects the alt attribute. I suppose we could adapt a similar "cascade" including aria-label and aria-describedby?

@danielweck
Copy link
Member

danielweck commented Mar 22, 2023

Note that for MathML, Thorium selects the alttext attribute, and fallback to the textual content within the math fragment. However also note that when MathJax is activated (either at document authoring time, or by Thorium itself at document rendering time), then Thorium finds the aria-label which can either be generated dynamically / automatically by the MathJax library, or based on the original MathML alttext (the latter takes precedence).

@civodulab
Copy link
Author

If I understand correctly I have to put my description either in <title> or in the aria-label of the SVG.

@danielweck
Copy link
Member

danielweck commented Mar 24, 2023

DAISY Knowledge Base: http://kb.daisy.org/publishing/docs/html/svg.html
(todo: role="presentation" skip)

@gautierchomel gautierchomel self-assigned this Jul 7, 2023
@danielweck
Copy link
Member

Technical details: readium/r2-navigator-js#76

@danielweck
Copy link
Member

Also see daisy/epub-accessibility-tests#84

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

No branches or pull requests

3 participants