Skip to content

CommandBar doesn't provide overflow for farItems and items cut off at small viewport sizes #11842

@brandonthomas

Description

@brandonthomas

Environment Information

  • Package version(s): Fabric 7.x.x
  • Browser and OS versions: NA

Describe the issue:

Many of our apps use a component we build that includes a CommandBar. For us to be compliant with the reflow part of WCAG 2.1 we need to support viewports down to 320px. The issue with CommandBar and its farItems prop is that it's rendered into an OverflowSet that black boxes a nullRender function. So if we have consumers who put in 10 items it's impossible for them to be compliant.

Problem Line:
https://github.com/OfficeDev/office-ui-fabric-react/blob/770a4ea294c8d523208bc94532655148d88139f7/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.base.tsx#L124

Screenshot of cutoff
image

Please provide a reproduction of the issue in a codepen:

https://codepen.io/brandonthomas/pen/KKwjWjm -> Simply go here and squish the viewport to 320px.

Actual behavior:

farItems cut off and there's nothing a consumer can do because the null render is black boxed within CommandBar.

Expected behavior:

Far items don't cut off when the viewport is reduced.

Documentation describing expected behavior

https://www.w3.org/TR/WCAG21/#reflow

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions