fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[DetailsList] When header click doesn't have an action, header role shouldn't be "button"

Open satbai opened this issue 9 years ago • 2 comments

Bug Report

  • Package version(s): all

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? (Yes, No) No

Requested priority: (Blocking, High, Normal, Low) Normal

Describe the issue:

The DetailsList header's role is always a button. Button makes sense when the header does sorting, but when it's just a header, the role shouldn't be a button.

Actual behavior:

header role=button image

Expected behavior:

Header role shouldn't be a button if clicking it does nothing.

satbai avatar Aug 23 '17 21:08 satbai

@ThomasMichon you've been tweaking things in this area

dzearing avatar Aug 24 '17 05:08 dzearing

The header is given a role of 'button' only if the column is not defined as disabled:

https://github.com/OfficeDev/office-ui-fabric-react/blob/8e5a33aca736718ff5a8b5b22606d51809c222fe/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.tsx#L256

@satbai Closing for now, please reply if issues remain

erichdev avatar Oct 14 '17 01:10 erichdev