Opened 11 years ago
Closed 11 years ago
#33754 closed defect (bug) (fixed)
Post meta box toggles accessibility improvements
| Reported by: | afercia | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Administration | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | ui, accessibility, javascript |
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
@
11 years ago
- Owner set to
- Status new → 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
@
11 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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()