React-virtualized: Outline of components

Created on 17 Aug 2017  路  2Comments  路  Source: bvaughn/react-virtualized

I have found that all the examples on the react-virtualized website have outline, when it focused. Is it expected behavior?

I am disabling it my project by adding

.ReactVirtualized__Grid {
  outline: none;
}

Should it be disabled in react-virtualized/styles.css the same way or there are more elegant way?

Most helpful comment

This outline is an important accessibility mechanism for keyboard-only users. As such, I feel pretty strongly that it should be enabled by default for focusable elements.

You're free to disable it yourself via a custom className or inline style (eg style={{ outline: 'none' }}). react-virtualized supports both. :)

Related to issues #381, #344

All 2 comments

This outline is an important accessibility mechanism for keyboard-only users. As such, I feel pretty strongly that it should be enabled by default for focusable elements.

You're free to disable it yourself via a custom className or inline style (eg style={{ outline: 'none' }}). react-virtualized supports both. :)

Related to issues #381, #344

For anyone running into this thread confused on the specific fields to set, you can use gridStyle (inline) or gridClassName if you need to use dynamic class names (such as with material-ui's makeStyles, etc).

See: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md#prop-types

Was this page helpful?
0 / 5 - 0 ratings