Opened 8 years ago
Closed 8 years ago
#33599 closed defect (bug) (duplicate)
Customize: Make the Add a Widget button a button
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Customize | Keywords: | has-patch close |
Focuses: | ui, accessibility, javascript | Cc: |
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
@
8 years ago
- Summary changed from Customizef: Make the Add a Widget button a button to Customize: Make the Add a Widget button a button
@
8 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
@
8 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.
Thanks for fixing the typo Sergey, you beat me to it for a few seconds :)