The "Screen Reader Accessibility" section on the SplitText page claims support for screen readers but misses some important caveats.
Specifically the "Built-in Aria*" section talks about using aria-label and applies it to an <h2> in the example code.
The SplitText animation demo, however, use a <div>. It seems reasonable a user would not always apply SplitText to a heading and might use code from the demo.
So here are the challenges:
My suggested changes:
- Identify which HTML elements / ARIA roles support
aria-label.
- Counsel against using any that don't.
- Warn of auto-translation risks.
- Warn against using on any interactive control.
I also performed screen reader testing against the linked demo:
| Pairing |
Works? |
| NVDA / Firefox |
yes |
| JAWS / Chrome |
no |
| Narrator / Edge |
no |
| VO macOS / Safari |
no |
| Orca / Firefox |
no |
| TalkBack / Chrome |
yes |
| TalkBack / Firefox |
no |
| VO iPadOS / Safari |
no |
The YouTube video embedded on the page shows a screen reader demo, but without knowing which screen reader and browser pairing was used, I tried a few.
The "Screen Reader Accessibility" section on the SplitText page claims support for screen readers but misses some important caveats.
Specifically the "Built-in Aria*" section talks about using
aria-labeland applies it to an<h2>in the example code.The SplitText animation demo, however, use a
<div>. It seems reasonable a user would not always apply SplitText to a heading and might use code from the demo.So here are the challenges:
<div>, which in the HTML AAM maps to the generic role.genericrole does not allow itself to be named by the author — which meansaria-labelis prohibited on it.aria-label, but without any explanation why.aria-labelmay not auto-translate for users.aria-labelis applied to any control (such as a button, though it does address links by duplicating text).My suggested changes:
aria-label.I also performed screen reader testing against the linked demo:
The YouTube video embedded on the page shows a screen reader demo, but without knowing which screen reader and browser pairing was used, I tried a few.