Text-Fragments: expose the highlighted range to AT
Categories
(Core :: Disability Access APIs, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: hsinyi, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
Attachments
(10 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
spin off the second point of bug 1904796 comment 1 to here
Expose the highlighted range to AT. Here "wrapping in <mark>", we can't modify the DOM since that would break scripts and violate specs. We could change the Accessibility tree, although it might need to insert multiple mark nodes since the range can cross element boundaries. Otherwise we'd need some way to annotate a range of text as being highlighted.
Reporter | ||
Updated•8 months ago
|
Reporter | ||
Updated•8 months ago
|
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 1•7 months ago
|
||
This test is disabled on CI because it's a bit fragile and we've never been able to work out how to fix that.
However, it's still useful locally.
Unfortunately, because it's disabled on CI, this problem wasn't caught when tests were moved around.
Assignee | ||
Comment 2•7 months ago
|
||
This doesn't matter for spelling errors.
However, we will soon generalise this code for use with other attributes like this.
In particular, custom highlights require us to use AbstractRange.
While we aren't supporting custom highlights in this bug, it is more effective to do this as part of this major refactor rather than doing another refactor later.
Assignee | ||
Comment 3•7 months ago
|
||
See the code comments for details.
We will soon use this for spelling errors, etc.
Assignee | ||
Comment 4•7 months ago
|
||
An array of ints is fine for spelling errors, but we need to support multiple attributes like this.
We could use an array of ints for each attribute and search each one, though that would require more work in the parent process.
Also, custom highlights can have multiple selections for a single highlight type.
This would be rather messy with int arrays, especially where multiple selections span beyond the Accessible.
Assignee | ||
Comment 5•7 months ago
|
||
Previously, this code was specifically tied to the spell check selection.
Actually adding more selection types will come in subsequent patches.
Assignee | ||
Comment 6•7 months ago
|
||
There should be no functional change here.
Assignee | ||
Comment 7•7 months ago
|
||
nsISelectionListener isn't sufficient because it only notifies that the selection has changed.
A11y needs to know specifically which ranges were added or removed.
Previously, we handled this specifically for spelling errors in mozInlineSpellChecker.
That code has been removed and replaced with a more general approach.
Since we now have these notifications, rather than using nsISelectionListener just to fire events, we now use these notifications for that as well.
This avoids the need to add additional nsISelectionListeners, which would get messy particularly for custom highlights where there can be an arbitrary number of selections at any given time.
Assignee | ||
Comment 8•7 months ago
|
||
We will need this for the text fragment tests.
Assignee | ||
Comment 9•7 months ago
|
||
We need this for the text fragment tests to load the page with an initial fragment.
Assignee | ||
Comment 10•7 months ago
|
||
This is now simply a matter of leveraging the work in the previous patches to support the new selection type and map it to the correct attribute.
Updated•7 months ago
|
Comment 11•7 months ago
|
||
Comment 12•7 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/30bd5e3c1866
https://hg.mozilla.org/mozilla-central/rev/9f5803b39d98
https://hg.mozilla.org/mozilla-central/rev/15cfaad587a6
https://hg.mozilla.org/mozilla-central/rev/0fa8b0016abf
https://hg.mozilla.org/mozilla-central/rev/4ceae709871c
https://hg.mozilla.org/mozilla-central/rev/32ad063c00ea
https://hg.mozilla.org/mozilla-central/rev/085ae013a8b1
https://hg.mozilla.org/mozilla-central/rev/c720d5439268
https://hg.mozilla.org/mozilla-central/rev/44df48fd4cc9
https://hg.mozilla.org/mozilla-central/rev/4248d8df19ca
https://hg.mozilla.org/mozilla-central/rev/3b8dc45d7b53
Description
•