Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#61028 closed defect (bug) (fixed)

Thickbox modal outputs replacement character in screen reader output

Reported by: stevejonesdev Owned by: joedolson
Priority: normal Milestone: 6.6
Component: Administration Version: 3.8
Severity: normal Keywords: has-patch commit
Cc: Focuses: accessibility

Description (last modified by sabernhardt)

In the thickbox modal, the close button dashicon shows as a replacement character (�) in the screen reader output.

Current screen reader output:

Close �, button, group

dashicons character is shown in speech viewer with text: 'Close, button, group'

Expected screen reader output:

Close, button

speech viewer should only show text: 'Close, button'

This can be fixed by adding aria-hidden="true" to the icon span.

<button type="button" id="TB_closeWindowButton">
     <span class="screen-reader-text">Close</span>
     <span class="tb-close-icon" aria-hidden="true"></span>
</button>

Attachments (3)

current-screen-reader-output.png​ (12.8 KB ) - added by sabernhardt 2 years ago.
dashicons character is part of screen reader output
expected-screen-reader-output.png​ (11.4 KB ) - added by sabernhardt 2 years ago.
"Close, button" output without the dashicons character
61028.diff​ (4.4 KB ) - added by sabernhardt 2 years ago.
adding aria-hidden to each Close button

Download all attachments as: .zip

Change History (9)

@sabernhardt
2 years ago

dashicons character is part of screen reader output

@sabernhardt
2 years ago

"Close, button" output without the dashicons character

@sabernhardt
2 years ago

adding aria-hidden to each Close button

#1 @sabernhardt
2 years ago

  • Component General → Administration
  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed
  • Milestone Awaiting Review → 6.6
  • Version 6.5 → 3.8

I changed the version to 3.8 because [26395] is when the icon was introduced. For more historical context:

#2 @sabernhardt
2 years ago

Thanks for the report!

#3 @joedolson
2 years ago

  • Owner set to joedolson
  • Status new → accepted
  • Type enhancement → defect (bug)

Changing this from an enhancement to a bug.

#4 @joedolson
2 years ago

  • Keywords commit added

Patch works as expected, and looks good to go.

#5 @joedolson
2 years ago

In 58167:

Administration: A11y: Hide thickbox close icon from screen readers.

Add aria-hidden="true" to the dashicon symbol used as the close icon in Thickbox modals. Prevent the icon from being read as a replacement character by screen readers.

Props stevejonesdev, sabernhardt, joedolson.
See #61028.

#6 @joedolson
2 years ago

  • Resolution → fixed
  • Status accepted → closed

Closing as fixed; the see reference was supposed to be a fixed.

Note: See TracTickets for help on using tickets.