Opened 9 years ago
Closed 9 years ago
#34255 closed defect (bug) (fixed)
Edit permalink accessibility improvements
Reported by: | afercia | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Permalinks | Keywords: | has-patch has-screenshots commit |
Focuses: | ui, accessibility, administration | Cc: |
Description
After recent changes to the sample permalink displayed below the Post title, see #18306 and #33495, it would be great to introduce some accessibility improvements. Most noticeably, the "Cancel" link should be a button and the "Edit" button should probably have an aria-label
attribute to better describe its purpose for assistive technologies users.
Also, I've noticed some JavaScript related things that could be improved a bit.
Screenshot for reference:
Attachments (2)
Change History (7)
#3
@
9 years ago
Forgot to say there are no visual changes :) Edit: except for the Cancel button see the button-link
class and #34242
Quick reference for the keypress
event:
https://api.jquery.com/keypress/
...similar to the keydown event, except that modifier and non-printing keys such as Shift, Esc, and delete trigger keydown events but not keypress events. Other differences between the two events may arise depending on platform and browser.
Based on some quick testing, seems to me latest Firefox and IE 8 do trigger the keypress event when pressing Escape, latest Chrome doesn't. Can't test in modern IE and Safari.
First pass:
aria-label
attribute to the Edit button to better describe its purposewp.a11y.speak
message to confirm savingtype="button"
attribute don't have a default action to preventwhich
for key codese.preventDefault();
when pressing Enter on the input field instead ofreturn false
return false
when pressing Escape#titlediv
instead of#edit-slug-box
to prevent screen readers announcing "clickable Permalink"