Opened 11 years ago
Closed 11 years ago
#33599 closed defect (bug) (duplicate)
Customize: Make the Add a Widget button a button
| Reported by: | afercia | Owned by: | afercia |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Customize | Version: | 4.3 |
| Severity: | normal | Keywords: | has-patch close |
| Cc: | Focuses: | ui, accessibility, javascript |
Description
For semantics, accessibility and consistency with the Menu Customizer, the "Add a Widget" button should be a button element. See: https://core.trac.wordpress.org/ticket/33260#comment:30
we should switch it to a <button> element and move it into customize-controls.css.
Attachments (2)
Change History (11)
#1
@
11 years ago
- Summary Customizef: Make the Add a Widget button a button → Customize: Make the Add a Widget button a button
@
11 years ago
I'm not sure if the CSS was moved properly. Also not sure if we need a context for the button i18n, so critics and suggestions are very welcomed :)
#3
@
11 years ago
There are a few more things to do here. The buttons: "Add a Widget", "Add a Menu" and "Add Items" are very, very, similar and should basically have the same CSS rules.
Same for the HTML part, but here there's no need for an aria-label attribute to better specify the button's purpose. Also, no more need for tabindex.
About the JavaScript part, buttons don't need a keydown event. We should handle the aria-expanded attribute and set proper attributes when the UI is in "reordering" mode, as done in the Menu Customizer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for fixing the typo Sergey, you beat me to it for a few seconds :)