-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IA2TextTextInfo.expand: Correctly add the text start offset when adjusting for embedded objects during mouse navigation. #16912
Conversation
…sting for embedded objects during mouse navigation.
WalkthroughThe recent changes enhance the NVDA screen reader's text reporting capabilities, particularly in Mozilla Firefox. The modifications ensure more reliable and accurate reporting of text surrounding links when the mouse hovers over them. This improvement aims to provide a better user experience by ensuring consistent text feedback while navigating web content, thereby contributing to the overall accessibility of NVDA. Changes
Assessment against linked issues
Recent review detailsConfiguration used: .coderabbit.yml Files selected for processing (2)
Additional context usedPath-based instructions (2)
Additional comments not posted (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Link to issue number:
Fixes #15990.
Summary of the issue:
In Firefox, when a paragraph, line, etc. contains links (or other elements), moving the mouse over text before or after the link sometimes doesn't report the text correctly. I attempted to fix this in #14755, and while my fix did work in some cases, it seems it wasn't quite complete.
Description of user facing changes
In Mozilla Firefox, moving the mouse over text before or after a link now reliably reports the text.
Description of development approach
To search for embedded objects,
IA2TextTextInfo.expand
fetches the text between the expanded start and end offsets. Previously, when adjusting the offsets if an embedded object was found, the code didn't add the offset from the start of the object to the start of the retrieved text. Now it does.Testing strategy:
Verified that the reported failures in #15990 (comment) and #16902 (comment) work as expected with this change.
Also verified with this distilled test case:
data:text/html,<p>ab<br>bcd <a href="/">efg</a> hij
Before this change, with mouse reading unit set to paragraph, moving the mouse to b only reported "b" and moving the mouse to h reported "cd hij". After this change, moving the mouse to b reports "bcd" and moving the mouse to h reports "hij", as expected.
Known issues with pull request:
None.
Code Review Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
expand
method, refining the detection of embedded objects within text.