Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update List actionable items to be wrapped with Link #2779

Merged
merged 4 commits into from Aug 19, 2019

Conversation

@joshuatf
Copy link
Contributor

commented Aug 12, 2019

Fixes #2672

Updates the list items to be wrapped with links to be more a11y friendly.

Screenshots

Screen Shot 2019-08-12 at 6 05 34 PM

Detailed test instructions:

  1. Check that list items continue working in both the DevDocs and the task list dashboard.
  2. Check that list actions are accessible.

@joshuatf joshuatf requested a review from woocommerce/wc-admin Aug 12, 2019

@joshuatf joshuatf self-assigned this Aug 12, 2019

@psealock
Copy link
Collaborator

left a comment

This is looking great! Thanks for handling this @joshuatf. Just a comment about tags if there is just an onClick prop.

const { after, before, className: itemClasses, description, onClick, title } = item;
const hasAction = 'function' === typeof onClick;
const { after, before, className: itemClasses, description, href, onClick, target, title } = item;
const hasAction = 'function' === typeof onClick || href;

This comment has been minimized.

Copy link
@psealock

psealock Aug 14, 2019

Collaborator

I think hasAction should be

const hasAction = ! ! href;

// or just

const ActionTag = href ? Link : Fragment;

A list item with just an onclick should not have the anchor tag.

This comment has been minimized.

Copy link
@joshuatf

joshuatf Aug 19, 2019

Author Contributor

Went more with the latter in f65c6b4

This comment has been minimized.

Copy link
@joshuatf

joshuatf Aug 19, 2019

Author Contributor

Also added the $muriel-primary-500 blue as a focus outline to this. Not sure if we should override here with WC purple instead. /cc @jameskoster

@rrennick rrennick added this to In Progress PRs (for automation purposes) in wc-admin via automation Aug 14, 2019

@rrennick
Copy link
Collaborator

left a comment

@joshuatf Nice work 🚢

@joshuatf

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2019

Thanks @rrennick!

Will address focus outline in a follow-up if it needs to be revised. /cc @jameskoster

@joshuatf joshuatf merged commit c600696 into master Aug 19, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

wc-admin automation moved this from In Progress PRs (for automation purposes) to Done Sprint 23 (August 13 - August 26) Aug 19, 2019

@joshuatf joshuatf deleted the update/2672-list-link branch Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.