Implement accessibility for SVG text element
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: surkov, Assigned: morgan)
References
(Blocks 1 open bug, )
Details
(Keywords: access)
Attachments
(1 file)
Bug 822988: Create HyperTextAccessibleWrap for SVG text objects for correct role assignment. r=Jamie
47 bytes,
text/x-phabricator-request
|
Details | Review |
Comment 1•12 years ago
|
||
Comment 2•5 years ago
|
||
Morgan, do you want to take a crack at this? Our lack of support for this is causing fuzzing pain; see bug 1471999.
Example on this page:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text
Beneath the diagram accessible, you'll see (e.g. with the Accessibility Inspector) text leaf accessibles. The expected result is that you should see text or text frame accessibles as the children of the diagram and the text leaf accessibles should be inside those; i.e. diagram -> text -> text leaf.
It should (hopefully?) just be a matter of checking for the SVG text element and creating a HyperTextAccessibleWrap for it here:
https://searchfox.org/mozilla-central/rev/5e830ac8f56fe191cb58a264e01cdbf6b6e847bd/accessible/base/nsAccessibilityService.cpp#1118
Then confirm that you no longer hit the assertion in the test case for bug 1471999. And add tree tests of course.
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to James Teh [:Jamie] from comment #2)
Morgan, do you want to take a crack at this? Our lack of support for this is causing fuzzing pain; see bug 1471999.
Example on this page:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/textBeneath the diagram accessible, you'll see (e.g. with the Accessibility Inspector) text leaf accessibles. The expected result is that you should see text or text frame accessibles as the children of the diagram and the text leaf accessibles should be inside those; i.e. diagram -> text -> text leaf.
It should (hopefully?) just be a matter of checking for the SVG text element and creating a HyperTextAccessibleWrap for it here:
https://searchfox.org/mozilla-central/rev/5e830ac8f56fe191cb58a264e01cdbf6b6e847bd/accessible/base/nsAccessibilityService.cpp#1118
Then confirm that you no longer hit the assertion in the test case for bug 1471999. And add tree tests of course.
yeah sure! do we have tests that cover similar things, or would this be a new suite? any examples I can reference? not sure how we check for accessibles in JS.
Comment 4•5 years ago
|
||
Looks like we currently only have role tests (not tree tests) for SVG:
accessible/tests/mochitest/role/test_svg.html
You could add a test for the text element there. That would confirm the fix, though I think I'd like to see a tree test as well confirming the diagram -> text -> text leaf tree structure. A simple tree test you can base this on is here:
accessible/tests/mochitest/tree/test_filectrl.html
I'd name it tree/test_svg.html; we can put other SVG tree tests there later.
Assignee | ||
Comment 5•5 years ago
|
||
Looks like adding a HyperTextAccessibleWrap
gives that intermediate text node role: text-container
instead of just role: text
. Is this expected behavior, or should I be creating a different kind accessible for the text object?
Assignee | ||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
TEXT_CONTAINER IS FINE. We use TEXT for inline content and TEXT_CONTAINER otherwise. I wasn't sure whether the frame would end up being inline or not (I'm not super familiar with SVG), hence the uncertainty around the role.
Comment 9•5 years ago
|
||
bugherder |
Description
•