moj-frontend
moj-frontend copied to clipboard
Scrollable area for tables and other things
As seen here on smaller screens:

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.
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:
- Fix the shadow
- Fully test and make improvements
- Document it