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: PreferencesSettings…Document FormattingFont: Superscript and subscripts.

NVDA settings dialog showing document formatting options to enable subscript and superscript announcement.

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 PreferencesAccessibilityVoiceOverOpen VoiceOver Utility. Once in that dialog, BrailleStatus: Show extended text style.

VoiceOver Utility dialog showing Braille formatting options to enable subscript and superscript announcement.

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.

Representation of eight Carbon-14 atoms with a +2 ionization state where the emulated Braille display has no gaps between the superscript 14, subscript 6, C, superscript 2+, or subscript 8. The same content as the previous image, but the emulated Braille display has an empty cell following each of the 14, 6, C, 2+, and 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 VerbosityText: 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:

One Comment

Reply

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:

  1. With JAWS running, press Insert+F2, then press S until Settings Center is selected, and press Enter.
  2. Press Ctrl+Shift+D to load the Default settings configuration.
  3. Type “scheme” in the search field, and Tab to the list of choices.
  4. Down Arrow until “Active Speech and Sounds Scheme” is chosen. Pressing Space while this option is selected will cycle through the available schemes.
  5. 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.)
  6. When the list of modifiable schemes comes up, Tab to “Edit Selected Scheme”, and press Enter.
  7. 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.
Jean Ducrot; . Permalink

Leave a Comment or Response

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>