Closed Bug 1783096 Opened 4 months ago Closed 4 months ago

[CTW] <label for> not exposed in cached relations for initial cache push

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: Jamie, Assigned: morgan)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ctw-m2])

Attachments

(1 file)

Test case:
data:text/html,<label for="input">label</label><input id="input">
The LABELLED_BY and LABEL_FOR relations aren't exposed as they should be. However, if you add the for attribute later (as the test currently does), it works as expected.

From Matrix:

eeejay:
in  RemoteAccessibleBase<Derived>::PreProcessRelations ,  if (data.mValidTag && TagName() != data.mValidTag)... 
if it is an initial push TagName will return null
so you can't compare tag names yet
this impacts the  for  relation that only works with labels
morgan:
so if that happens, we still need to make sure  updateTracker  has a  true  value for that rel, because there might be a rel in  aFields  that needs to go into mCachedFields once it's initialized
Jamie:
Another approach would be to try aFields->GetAttribute<RefPtr<nsAtom>>(nsGkAtoms::tag) if TagName() returns null.
Attachment #9288556 - Attachment description: WIP: Bug 1783096: Attempt to fetch tag from aFields if TagName() is null r?Jamie → Bug 1783096: Attempt to fetch tag from aFields if TagName() is null r?Jamie
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/272ea1f35d78
Attempt to fetch tag from aFields if TagName() is null r=Jamie
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.