Opened 11 years ago
Closed 10 years ago
#33754 closed defect (bug) (fixed)
Post meta box toggles accessibility improvements
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.4 | Priority: | normal |
| Severity: | normal | Version: | 4.4 |
| Component: | Administration | Keywords: | has-patch commit |
| Focuses: | ui, accessibility, javascript | Cc: |
Description
Thanks to the work done on #33544 the major accessibility issues are now fixed. There's still room for some improvements, most noticeably properly setting the aria-expanded initial attribute value on page load accordingly to their stored state. Without this aria-expanded can be set to true while the panel is actually closed.
Attachments (2)
Change History (10)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
11 years ago
#3
@
11 years ago
'Toggle panel: %s' seems fine to me; it's functional and concise, which is all I think is particularly important.
I was unaware that adding 'type="button" would make preventDefault() irrelevant. That seems incredibly nonintuitive to me; but definitely good to know!
(Off to revise a whole ton of old code...)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
11 years ago
#5
@
10 years ago
- Owner set to afercia
- Status changed from new to assigned
If you're going to use $(this) a bunch of times, set it to $el once and then use that. Also, if you can, use $(e.target) instead, makes porting procedural code to methods easier.
#6
@
10 years ago
- Keywords commit added
Refreshed patch as per @wonderboymusic suggestion. Noticed $( this ) and $( event.target ) are different in this case (the buttons have a span inside) so used the $el approach. Except for the each() loop where maybe setting variables doesn't make much sense and $( this ) is more appropriate.
First pass.
aria-expandedinitial attribute value on page loadaria-expandedalso when clicking on the headingsaria-expandedon the headingstype="button"attribute on the buttons, no need forpreventDefault()