Closed Bug 2033865 Opened 7 months ago Closed 6 months ago

HTML `readonly` attribute should apply to all <input> types

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: morgan, Assigned: morgan)

References

(Blocks 3 open bugs)

Details

Attachments

(1 external file)

Currently, an <input> that gets role=combobox will not expose the associated readonly HTML attribute. it will, however, expose aria-readonly. Based on the HTML spec it looks like we should be exposing both attributes the same. This bug tracks this behaviour change.

Here's a test case Anna provided on the linked bug which can be used to repro this issue:
data:text/html,<label>Combobox: <input role=combobox readonly value=URL></label><label>Text input:<input readonly value=URL></label><label>Combobox with ARIA: <input role=combobox readonly value=URL aria-readonly=true></label>

Right now, we preemtively remove readonly
here
on accs with an aria role to encourage ATs to make their own decisions about virtual buffer
creation. I think this makes sense for the document, but on <input>
fields with aria roles, I think it makes sense to re-add this state
indicator. I've done so in this patch.

Alternatively, we could make the ApplyARIAState check more specific. Let
me know what you think is best :)

Attachment #9572270 - Attachment description: WIP: Bug 2033865: Reapply `readonly` on HTML inputs after ApplyARIAState removes it r?Jamie → Bug 2033865: Reapply `readonly` on HTML inputs after ApplyARIAState removes it r?Jamie

HTML AAM is also quite clear about this:

  1. readonly maps to aria-readonly="true"
  2. "If the element includes both the readonly attribute and the aria-readonly attribute with a valid value, User Agents MUST expose only the readonly attribute value."
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
QA Whiteboard: [qa-triage-done-c153/b152]
No longer blocks: 2023668
Blocks: 2046276
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: