Opened 8 years ago
Closed 7 years ago
#43376 closed defect (bug) (fixed)
Semantic elements for non-link links: class-wp-comments-list-table.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 5.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Comments | Keywords: | semantic-buttons has-patch |
| Focuses: | accessibility, javascript | Cc: |
Description
The "Quick Edit" links in comment list should be changed to buttons (or ARIA role button).
Related: #38677
Attachments (5)
Change History (26)
#1
@
8 years ago
- Keywords has-patch added
Hi,
I uploaded two patches:
- Version 1:
43376_aria_role.diffaddsrole="button"attribute to the links - Version 2:
43376_button_element.diffreplacesatag withbuttontag with thebutton-linkclass for similar rendering
Both of the patches are tested and seems good to me.
Cheers,
Jb
#2
@
8 years ago
- Keywords needs-refresh added
- Version trunk deleted
@audrasjb thanks for the patch. I'd tend to think the version with tbe button is preferable. Please notice the button needs a type="button" attribute and would also benefit from an aria-expanded attribute to communicate to assistive technologies the expanded / collapsed status of the form (actually, more the collapsed status since when it opens, focus is moved and the button disappears). This would bring it in parity with what has been done for the Posts list Quick Edit in #38677 / [42725].
#3
@
8 years ago
Great, thanks.
I've seen your final patch for #38677 and I'll send a new patch soon.
@
8 years ago
Version 2 enhancement: adds role and aria-expandedattribute and fires it on click/cancel
#4
@
8 years ago
- Keywords needs-refresh removed
43376_button_element.2.diff works fine in my local install.
I tried to follow the path of #43382 for consistency @afercia.
#5
@
8 years ago
- Focuses javascript added
- Milestone changed from Awaiting Review to 5.0
- Owner set to afercia
- Status changed from new to assigned
The comments screen works in a slightly different way compared to the Posts and Terms screens. Changing the Quick Edit link to a button will change the Reply link too. That's fine because both work in the same way: they're not available when JavaScript is off and they open their own form. The JavaScript part needs to take into account both cases.
In 43376.diff :
- the Reply and Quick Edit links are now buttons
- they have an
aria-expandedattribute, dynamically updated based on the form collapsed / expanded state - when closing the Reply or Quick Edit forms, focus is moved back to the proper button
- I've slightly refactored the JS part to use more meaningful variable names:
commentRowandreplyRow - removes
e.preventDefault()which is no longer necessary, as the links are not buttons with an attributetype="button", i.e.: there's no default action to prevent
Tested and looks good to me. Some more testing welcome!
#9
@
8 years ago
There was already #38676 for the comments screen, not a big deal we can use this new ticket. Props to @Cheffeid for the patch on the old ticket.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
8 years ago
#14
@
7 years ago
- Keywords has-patch removed
- Milestone changed from 5.0 to 5.0.1
- Resolution fixed deleted
- Status changed from closed to reopened
Version 1: add button aria role to links with "#" anchor.