Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

The row actions links should be buttons #5

Open
afercia opened this issue Jun 3, 2017 · 1 comment
Open

The row actions links should be buttons #5

afercia opened this issue Jun 3, 2017 · 1 comment
Labels

Comments

@afercia
Copy link

afercia commented Jun 3, 2017

See also #3

Currently, the row actions links are rendered as links, for example:
<a aria-label="Unapprove this comment" class="vim-u vim-destructive" href="#">Unapprove</a>

However, they don't point to a real resource, instead they perform an action. Also, as far as I see there's no "Edit" screen to point to any longer, that was one of the very few cases where a link was appropriate. Many of these links in WordPress are still inks because of the no-js fallback: when JS is disabled they actually behave like links. In this case though, everything is JS-based so they should be buttons.

See also the decision logic summarized in the a11y standards: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/#semantics-for-controls

Making them buttons will also give a little advantage: no need to pass the event to prevent the default links action (scroll because of the # anchor).

@rmccue
Copy link
Member

rmccue commented Jun 6, 2017

Annoyingly, all the styles in core we're using require a, so they will all need to be patched.

Punting this for now, but will revisit once we support multiple list tables, because the styles need to rewritten to be generic across all list tables anyway.

@rmccue rmccue added the Bug label Aug 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants