Brief Note on Super- and Subscript Text
Thanks to a conversation on the A11y Slack, I ran desktop browsers and screen readers through a test to see how they announce content marked up as superscript and subscript. I spun up an old demo from mid-2018 for a quick test:
See the Pen HTML Buddies: sub & sup by Adrian Roselli (@aardrian) on CodePen.
NVDA
NVDA has a user setting to enable superscript and subscript announcement: Preferences → Settings… → Document Formatting → Font: Superscript and subscripts.
Doing so works swimmingly unless they set CSS vertical-align: text-top
or vertical-align: baseline
. Then their superness or subness is not conveyed. I made another demo to confirm it:
See the Pen Super- and Sub-script by Adrian Roselli (@aardrian) on CodePen.
Originally I thought this was an NVDA bug, but James Teh came along and set me straight (again). So I amended an existing Firefox bug that predates mine by two weeks: 1787976: Text position attributes not properly exposed on elements wrapped in sub or sup tags
The good news is that NVDA gives users the option.
VoiceOver
VoiceOver, regardless of browser, appears not to support announcing subscript or superscript text either. At least not audibly.
There is a setting in the VoiceOver Utility to enable it for Braille displays only. You can get to it with Ctrl + Option + F8 or, if (like me) that never works for you, Apple menu → System Preferences → Accessibility → VoiceOver → Open VoiceOver Utility. Once in that dialog, Braille → Status: Show extended text style.
That does nothing for announcement, but I opted to test it with the VoiceOver Braille display emulator using the compact but chemically odd 146C2+8.
Without the setting, the super and sub text run together with the plain text. With the setting enabled, empty Braille cells follow sub/super text. I am not sure the emulator built into VoiceOver is representing it correctly — I do not know Braille nor how a physical Braille display would render this.
If in the VoiceOver Utility you go to Verbosity → Text: When text attributes change and choose “Speak attributes”, then you will hear VoiceOver announce the superscript and subscript along with the typeface and font size. For everything. Which makes it impractical for regular use.
Using Ctrl + Option + T to speak the attributes on demand does not expose the superscript nor subscript.
Regardless, owing to the lack of a setting for users to hear only superscript and subscript text, I filed an issue: 245278: AX: VoiceOver has no setting for sub/superscript announcement
Oddly, I had to log it against Safari 15 because Safari 16 was not an option even though it has been out for nearly a week and 16.1 is supposedly on its way.
JAWS
JAWS has no settings. At least none that I could find. It ignored superscript and subscript text completely. I do not know if at one point it had the feature, as someone suggested, because I am not running older versions to test. Regardless it does not appear to have it today.
This issue was therefore a little more straightforward to file: 668 Expose superscript and subscript text
Recap
Three super/subscript issues filed, two of them against screen readers:
- Firefox: 1787976: Text position attributes not properly exposed on elements wrapped in sub or sup tags
- VoiceOver: 245278: AX: VoiceOver has no setting for sub/superscript announcement
- JAWS: 668 Expose superscript and subscript text
One Comment
I recently had to do some research on this topic and a blind colleague pointed out that in JAWS 21 (not sure about 22) you have to edit a sound scheme to enable superscript and subscript announcements. It’s buried deep down in the settings and nothing comes up when you search the JAWS documentation for the obvious key words. Here are the steps to get there from the JAWS docs:
- With JAWS running, press Insert+F2, then press S until Settings Center is selected, and press Enter.
- Press Ctrl+Shift+D to load the Default settings configuration.
- Type “scheme” in the search field, and Tab to the list of choices.
- Down Arrow until “Active Speech and Sounds Scheme” is chosen. Pressing Space while this option is selected will cycle through the available schemes.
- Continue pressing Down Arrow until “Modify Schemes…” is chosen. Pressing Space here will bring up a list of schemes which can be modified. (It’s okay to choose this, so long as you don’t save any changes you make to pre-existing schemes.)
- When the list of modifiable schemes comes up, Tab to “Edit Selected Scheme”, and press Enter.
- Press Ctrl+Tab until the Attributes Page in the multi-tab dialog is shown. Both subscript and superscript are available as configurable attributes in this list.
Leave a Comment or Response