Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56230 closed defect (bug) (fixed)

Incorrect aria-live announcement when removing a permalink custom structure

Reported by: joedolson's profile joedolson Owned by: joedolson's profile joedolson
Milestone: 6.1 Priority: normal
Severity: normal Version: 4.9
Component: Permalinks Keywords: has-patch commit add-to-field-guide
Focuses: accessibility, javascript Cc:

Description (last modified by sabernhardt)

When removing an added custom structure at Settings > Permalinks, the same message is announced as when adding the custom structure, e.g. "year added to permalink structure". The message when removing should instead indicate "year removed from permalink structure".

The button's aria-label is changed to indicate that the element is already used, and that changes after activating the link, but the announced message will give the impression that you have added the structure rather than removing.

This was introduced in changeset:41182.

Attachments (3)

56230.diff (1.8 KB) - added by joedolson 2 years ago.
Add 'remove' message to permalink structure buttons
56230.2.diff (2.2 KB) - added by SergeyBiryukov 2 years ago.
56230.3.diff (2.0 KB) - added by joedolson 2 years ago.
Move setting textToAnnounce back to before it's announced.

Download all attachments as: .zip

Change History (13)

@joedolson
2 years ago

Add 'remove' message to permalink structure buttons

#1 @joedolson
2 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#2 @joedolson
2 years ago

Tested with NVDA/Chrome already.

Testing:

  • at Settings > Permalinks, using a screen reader, navigate to custom structure buttons.
  • Add a structure to the permalink format, noting announcement '{tag} added to permalink structure'
  • Navigate back to same structure, click again to remove. note announcement '{tag} removed from permalink structure'.

#3 @sabernhardt
2 years ago

  • Description modified (diff)

#4 @kebbet
2 years ago

  • Keywords needs-refresh added

Might need a refresh after all updates to options-permalink.php.

#5 @SergeyBiryukov
2 years ago

  • Keywords needs-refresh removed

Refreshed after [53710].

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


2 years ago

@joedolson
2 years ago

Move setting textToAnnounce back to before it's announced.

#7 @joedolson
2 years ago

  • Keywords commit added; needs-testing removed

Updated patch & tested with VoiceOver/Safari & JAWS/Firefox. Marking for commit.

#8 @joedolson
2 years ago

  • Owner set to joedolson
  • Status changed from new to accepted

#9 @joedolson
2 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 53911:

Permalinks: Fix aria-live text when removing custom structure.

Change the notification announced when a custom structure is removed. Previously, the notification incorrectly indicated that the structure was added for both actions. This changes the notification to correctly announce removals when structures are removed.

Props joedolson, kebbet, SergeyBiryukov.
Fixes #56230.

#10 @milana_cap
2 years ago

  • Keywords add-to-field-guide added
Note: See TracTickets for help on using tickets.