Bug 243744 - AX: `<th abbr>` not exposed to users
Summary: AX: `<th abbr>` not exposed to users
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2022-08-09 12:56 PDT by Adrian Roselli
Modified: 2022-08-10 20:40 PDT (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Roselli 2022-08-09 12:56:53 PDT
## Steps to reproduce the problem:
1. Go to https://cdpn.io/pen/debug/JjLZayQ#abbr-attr (the September table),
2. Inspect the accessibility properties of any column header,
3. Observe the visible text is exposed as the element's value, not the value of the `abbr` attribute.

## Problem Description:
The `abbr` attribute on the `<th>` element is meant to be "an alternative label for the header cell" (https://html.spec.whatwg.org/multipage/tables.html#attr-th-abbr). It should be exposed as part of the Computed Properties for both the header cell and all cells in that column.

Instead, the following construct only exposes its contents ("Tu") and does not provide the `abbr` attribute ("Tuesday") in the accessibility tree:

<th abbr="Tuesday">

As a developer, to convey the alternate name to screen reader users I am forced to use this construct:

  <span aria-hidden="true">Tu</span>
  <span class="visually-hidden">Tuesday</span>
With this CSS:
.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  white-space: nowrap; 

VoiceOver on macOS steps in to fill the gap by announcing the header cell correctly, but VoiceOver on iOS/iPadOS does not. Fixing this issue in the browser means the lack of parity between VoiceOvers should no longer be an issue, since it would get the value from the common WebKit engine.
Comment 1 Radar WebKit Bug Importer 2022-08-09 12:57:05 PDT