[wp-trac] [WordPress Trac] #34867: Introduce a CSS class which identifies elements that are either links or buttons depending on JS presence
WordPress Trac
noreply at wordpress.org
Sun Dec 6 17:31:10 UTC 2015
#34867: Introduce a CSS class which identifies elements that are either links or
buttons depending on JS presence
-------------------------------------------------+-------------------------
Reporter: mcapybara | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Administration | Review
Severity: normal | Version: trunk
Focuses: ui, accessibility, javascript, | Keywords:
administration |
-------------------------------------------------+-------------------------
This ticket is related to issue
[#26504](https://core.trac.wordpress.org/ticket/26504) and specifically
comment [#28](https://core.trac.wordpress.org/ticket/26504#comment:28).
ARIA role of "button" should be added to edit linked when javascript is
enabled. This will assist those visitors using screen readers because the
number of elements reported as links will be significantly fewer. For
example, on the Categories page in the .row-actions links div, each of
these links are actually buttons if javascript is enabled, however they
are currently being reported as links. This is correct when javascript is
disabled because they are actually refreshing the page, but if javascript
is enabled the action taken by these links is an AJAX call which does not
link to any outside page.
Our proposal is to add a class to these types of elements if javascript is
enabled. This may look something like .button-if-js (similar to the .hide-
if-no-js class being used to toggle display of the .row-action "Quick
Edit" link. If the .button-if-js class is present and javascript is
enabled role="button" is appended to the element. This will limit the
number of reported links on the page and the user will interpret the
elements as buttons that take action without leaving the page.
This issue and proposal was identified at WordCampUS Contributor Day. We
are working with the Accessibility group to submit a patch.
Contributors on this ticket include:
@garusky
@takayukister
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34867>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list