Fire name/description change event when aria-labelledby/describedby content changes
Categories
(Core :: Disability Access APIs, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: surkov, Assigned: Jamie)
References
(Blocks 2 open bugs)
Details
(Keywords: papercut, parity-chrome)
Attachments
(5 files)
Reporter | ||
Comment 1•15 years ago
|
||
Comment 3•10 years ago
|
||
Reporter | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Reporter | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Reporter | ||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Reporter | ||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
This is affecting people in the real world. See NVDA issues https://github.com/nvaccess/nvda/issues/9387 https://github.com/nvaccess/nvda/issues/1626. This is a problem for the Facebook Notifications button (and the fact that this misbehaves was one reason for an NVDA performance improvement being backed out); see https://github.com/nvaccess/nvda/pull/9114#issuecomment-467665494. A similar problem applies to aria-describedby; see https://github.com/nvaccess/nvda/issues/9400.
Both of these test cases demonstrate the problem and work in Chrome, but fail in Firefox:
Label change (pressing the button should fire a name change event):
data:text/html,<div id="label">a</div><button aria-labelledby="label" onClick="label.textContent = 'b';">foo</button>
Description change (pressing the button should fire a description change event):
data:text/html,<div id="desc">a</div><button aria-describedby="desc" onClick="desc.textContent = 'b';">label</button>
In both cases, NVDA's virtual buffer does not update with the correct info because the appropriate events aren't fired.
Reporter | ||
Comment 13•6 years ago
|
||
Bug title feels too generic, because it's difficult to implement name change events whenever name is changed, but supporting aria-labelledby/described_by is doable. So I would change bug summary to reflect that. Regarding to implementation itself, it seems HasNameDependentParent logic should be extended to handle ID-referencing attributes.
Assignee | ||
Comment 14•6 years ago
|
||
Agreed. Thanks heaps for the implementation hint, Alex!
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 15•4 years ago
|
||
Assignee | ||
Comment 16•4 years ago
|
||
HasNameDependent is now set on an Accessible (and thus its descendants) which has A LABEL_FOR relation.
When text mutations occur on such an Accessible, EventQueue::PushNameChange now queues a name change for the Accessible being labelled.
Assignee | ||
Comment 17•4 years ago
|
||
This uses a similar approach to HasNameDependent, introducing a new HasDescriptionDependent.
However, we don't fire events on ancestors, since a description is never computed from an Accessible's own subtree without an explicit described by relation.
Assignee | ||
Comment 18•4 years ago
|
||
Assignee | ||
Comment 19•4 years ago
|
||
Assignee | ||
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/12e73301de8f
https://hg.mozilla.org/mozilla-central/rev/24847760402f
https://hg.mozilla.org/mozilla-central/rev/cefb1c1d3f5e
https://hg.mozilla.org/mozilla-central/rev/2a3f24bdb8e2
https://hg.mozilla.org/mozilla-central/rev/2c9004c95a7a
Description
•