Closed Bug 1659877 Opened 4 years ago Closed 4 years ago

Announce print UI form errors to screen readers

Categories

(Toolkit :: Printing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Accessibility Severity s2
Tracking Status
firefox82 --- fixed

People

(Reporter: mstriemer, Assigned: Gijs)

References

Details

(Keywords: access, Whiteboard: [print2020_v82])

Attachments

(1 file)

There are some print settings that can be invalid, like copies < 0, page ranges end > start, etc. We've got error messages for some of these on the page, but they should be announced when using a screen reader.

Theoretically using el.setCustomValidity(errorMessage.textContent) would work, but trying that on the scale input didn't seem to work for me initially.

Blocks: 1657994
Keywords: access
Whiteboard: [access-s2]

Hi Emma, can you please set a priority and severity on this bug?

Flags: needinfo?(emalysz)
Severity: -- → S2
Flags: needinfo?(emalysz)
Priority: -- → P2

(In reply to Mark Striemer [:mstriemer] from comment #0)

Theoretically using el.setCustomValidity(errorMessage.textContent) would work, but trying that on the scale input didn't seem to work for me initially.

Using setCustomValidity alone isn't enough. You must call reportValidity to actually report this to the user.

Note that this will use the browser UI for reporting validity errors. While it's generally better to use the standard UI, I understand there may be some reason you don't want this. In that case, set role="alert" on your error messages and they will get reported by screen readers when they appear. We should ideally set aria-errormessage="the-error-id" on the input as well, but aria-errormessage is currently not widely supported, so this is a nice-to-have.

Whiteboard: [access-s2] → [print2020_v81][access-s2]
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Whiteboard: [print2020_v81][access-s2] → [print2020_v82][access-s2]
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/59fbb6793bb5
expose print dialog error messages to assistive technology via role=alert and aria-errormessage, r=Jamie,emalysz
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Accessibility Severity: --- → s2
Whiteboard: [print2020_v82][access-s2] → [print2020_v82]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: