Skip to content

Matrix inputs: expose delimiter shapes to assistive technology - #1851

Merged
sangwinc merged 2 commits into
maths:iss1848from
adamant-pwn:codex/matrix-bracket-accessibility
Aug 26, 2026
Merged

Matrix inputs: expose delimiter shapes to assistive technology#1851
sangwinc merged 2 commits into
maths:iss1848from
adamant-pwn:codex/matrix-bracket-accessibility

Conversation

@adamant-pwn

@adamant-pwn adamant-pwn commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Following the accessibility discussion in #1849, this exposes the visual delimiters around fixed and variable-size matrix inputs to assistive technology.

Each visible left and right delimiter has a corresponding empty span with role="math" and a localized aria-label. This covers square brackets, parentheses, curly brackets and vertical bars. The no-brackets setting emits no accessibility elements.

The existing visual CSS and input API metadata are unchanged.

Verification

  • Added data-driven renderer tests covering all five matrixparens values for both matrix input types.
  • Updated existing exact-HTML renderer tests for the additional elements.
  • Rendered fixed and variable-size inputs through the standalone STACK API.
  • Verified in a browser accessibility snapshot that the order is left delimiter, input, right delimiter.
  • Verified that the empty elements have zero width and do not change the variable-input dimensions.
  • Rebasing onto the current iss1848 branch produced no conflicts, and PHP syntax checks pass for all modified PHP files.

Render localized left and right delimiter elements with the ARIA math role around fixed and variable-size matrix inputs. Cover square brackets, parentheses, curly brackets and vertical bars while omitting accessibility elements for the no-brackets setting. Keep visual rendering unchanged, centralize the shared markup in the input base class, and update documentation and focused renderer tests.
The API controller test expected the matrix table to directly follow the bracket wrapper. Account for the left accessibility span added by this pull request before the table.
@sangwinc

Copy link
Copy Markdown
Member

Thanks @adamant-pwn that's very helpful and much appreciated.

@sangwinc
sangwinc merged commit 228bd6c into maths:iss1848 Aug 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants