Accessible Name Guidance by Role Section: Change marquee name from required to discretionary - #1572
Conversation
| <td><a href="#marquee" class="role-reference"><code>marquee</code></a></td> | ||
| <td>Required</td> | ||
| <td>Discretionary</td> | ||
| <td>Use <code>aria-labelledby</code> if a visible label is present, otherwise use <code>aria-label</code>.</td> |
There was a problem hiding this comment.
I think this is ok but we could consider changing this to match the other discretionary roles which describe why you might want to give it an accessible name. However - I'm not sure I can really come up with a valid use case for that.
There was a problem hiding this comment.
It's valid to give a marquee a name, just didn't make sense to require it.
I very quickly tested 4 marquees using jaws/nvda in chrome/ff.
Notes:
- The first 2 marquees use (obsolete) HTML
<marquee>elements. One hasaria-labelledbyand the other hasaria-label. - The next 2 are fake marquees that use a span (I didn't add any animation). As above, one has
aria-labelledbyand the other hasaria-label. - Both browsers expose the role correctly, but I had to use
role="marquee"("belts and braces" style) on the 2 HTML<marquee>elements (otherwise, they just had a generic text container role). - Both browsers expose all 4 accessible names correctly, and they also expose the
aria-live="off". - Both screen readers read the
aria-labelledbyspan, because it's visible text content. :) - Neither screen reader read the
aria-label. - Both screen readers read all of the marquee's content, i.e. they ignored the animated scrolling.
So we could say something along the lines of, "When naming a marquee, aria-labelledby with a visible label is recommended, because some screen readers do not read an aria-label on a marquee."
I'll try Safari/VO tomorrow.
Edit: Safari/VO reads all 4 marquees well (using VO+arrows), and even reads the name of the 2 aria-label marquees. The explicit role was also needed on the obsolete html marquee elements (same as Chrome/FF).
carmacleod
left a comment
There was a problem hiding this comment.
Thanks, @smhigley !
Ok to go in as-is, but consider adding more specific info in the guidance column.
75c304f to
ee56d0f
Compare
Related to w3c/aria#1339 and w3c/aria#1342 on the ARIA repo.
I chose "discretionary" to match the guidance for log.
Preview | Diff