moj-frontend icon indicating copy to clipboard operation
moj-frontend copied to clipboard

Scrollable area for tables and other things

Open adamsilver opened this issue 6 years ago • 2 comments

As seen here on smaller screens:

image

adamsilver avatar Jul 11 '19 11:07 adamsilver

This was raised as a problem in the recent Accessibility Audit. We should add a "Responsive table" component which can be used to wrap tables in a 100% width div with overflow-x: auto;. This will allow tables to be scrollable rather than overflowing outside their parent element or the page in general.

Basically, we should replicate Boostrap's table-responsive class but as moj-table-responsive.

gregtyler avatar Jun 04 '21 14:06 gregtyler

This actually already exists as .moj-scrollable-pane__wrapper: I just spotted it in use on the Filter a list pattern. It also adds a shadow to indicate scrollability, but it's always there: to avoid confusion it should only appear when there is some overflow.

So we just need to:

  1. Fix the shadow
  2. Fully test and make improvements
  3. Document it

gregtyler avatar Jun 07 '21 11:06 gregtyler