Fix invalid math formatting report for ARIA role math in Chromium - #20734
Open
cary-rowen wants to merge 1 commit into
Open
Fix invalid math formatting report for ARIA role math in Chromium#20734cary-rowen wants to merge 1 commit into
cary-rowen wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #20727
Summary of the issue:
In Chromium based browsers, elements with
role="math"and an accessible name can expose their inner HTML through the IA2mathattribute.NVDA treated this attribute as raw MathML, wrapped it in a
<math>element, and passed the invalid markup to MathCAT. This caused NVDA to report invalid math formatting before reading the accessible name.Description of user facing changes:
NVDA no longer reports invalid math formatting for ARIA
role="math"elements in Chromium based browsers when the element provides an accessible name but no MathML.Description of developer facing changes:
None.
Description of development approach:
The IA2
mathattribute is now only treated as raw MathML when the object itself is a native MathML element.For non-native
role="math"elements, NVDA still checks fordata-mathmland still supports the existing fallback where a wrapper contains a single native<math>child. If no MathML is found,_get_mathMlraisesLookupError, allowing NVDA to fall back to the element's accessible name.Testing strategy:
Manually tested using the reproduction case from #20727:
In Chrome/Edge browse mode, moving to the expression no longer reports invalid math formatting, and NVDA reads the accessible name.
Also verified MathML content still works in Chromium by navigating math formulas in answers on chat.openai.com.
Known issues with pull request:
No known issues.
Code Review Checklist: