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

Change nicks from links to buttons everywhere #338

Closed
astorije opened this issue May 16, 2016 · 3 comments
Closed

Change nicks from links to buttons everywhere #338

astorije opened this issue May 16, 2016 · 3 comments
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Milestone

Comments

@astorije
Copy link
Member

As discussed in #325 (comment), clickable nicks should be buttons and not links as they don't take the user anywhere, per se.

There are several implications to this: @YaManicKill noticed highlighting does not work on buttons on Firefox for example.
Also, @cptvitamin, could you advise on accessibility consequences for this, please?

@xPaw mentioned in the PR that we could use <span role="button"> as well.

@astorije astorije added Type: Feature Tickets that describe a desired feature or PRs that add them to the project. help wanted labels May 16, 2016
@cptvitamin
Copy link

@xPaw @astorije adding a role just changes how the control gets announced to a screen reader. It doesn't add any of the magical behaviors that you get with a link or a button (its focusable and can be interacted with a keyboard, has various states, etc.) If you want to go with <span role=button> you will have to add all those default states and properties yourself. See "What using aria does not do": https://www.w3.org/TR/aria-in-html/#what-does-adding-a-role-do-to-the-native-semantics

Since copy/paste conversations is likely to be a feature users may want, it sounds like a span with a role of button is your best bet. You will want to add a tabindex="0" so that it can receive focus and then you will want to add keyboard event handlers for space/return.

@xPaw
Copy link
Member

xPaw commented May 16, 2016

Just a side note, when we (if) will change the user element, perhaps we should make a separate template for it.

@astorije
Copy link
Member Author

Thanks for your input, @cptvitamin!

@xPaw, yes! Although I'm thinking the template would not be a perfect fit everywhere, like the user list, but for everything else, definitely (it looks more and more like we are defining React components when creating a template :p).

@xPaw xPaw added this to the 2.0.0 milestone Jun 22, 2016
xPaw added a commit that referenced this issue Jun 22, 2016
@xPaw xPaw removed the help wanted label Oct 2, 2016
@astorije astorije added this to Done in Accessibility Feb 19, 2017
matburnham pushed a commit to matburnham/lounge that referenced this issue Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
Accessibility
  
Done
Development

No branches or pull requests

3 participants