fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Breadcrumbs defined as buttons instead of links

Open caiomontei opened this issue 7 years ago • 5 comments

Environment Information

  • Package version(s): 6.190.0
  • Browser and OS versions: Chrome or Edge, Windows 10
  • Screen reader(s): Narrator

Describe the issue:

Breadcrumb items are defined as HTML buttons instead of links

Please provide a reproduction of the issue in a codepen:

https://codepen.io/caiomontei/pen/ymKexK?&editable=true

Actual behavior:

Breadcrumb items are buttons

Expected behavior:

Breadcrumb items should be links

Documentation describing expected behavior

https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html

caiomontei avatar Aug 08 '19 00:08 caiomontei

Thanks @caiomontei - I agree with your assessment. Do you have an interest in submitting a PR for this change?

jdhuntington avatar Aug 08 '19 00:08 jdhuntington

Yeah, sure. I can do that.

caiomontei avatar Aug 08 '19 16:08 caiomontei

hi @jdhuntington ,

I have just created a PR for fixing this issue. https://github.com/OfficeDev/office-ui-fabric-react/pull/10113

Thanks

caiomontei avatar Aug 09 '19 23:08 caiomontei

@caiomontei Thanks very much for the fix!

jdhuntington avatar Aug 12 '19 20:08 jdhuntington

Moving conversation back to this issue--as I said in a PR comment yesterday (https://github.com/OfficeDev/office-ui-fabric-react/pull/10113#issuecomment-539288951), it turns out this change prevents "clicking" href-less breadcrumb items with the keyboard by pressing enter, which is a major accessibility issue.

Even aside from the accessibility issue, I'm not convinced that a breadcrumb item ought to be a link unless it has a href. To me the behavior prior to this change seems more correct, where anything with a href is a link and anything with just an onClick is a button. @caiomontei or @jdhuntington I'd be curious to hear your reasoning for why everything should be a link.

ecraig12345 avatar Oct 09 '19 00:10 ecraig12345