Files
nairobi/app/components/admin
Javi Martín 4c02317909 Fix enabled/disabled phase text for screen readers
Since we were using an icon font with no text, screen readers were
announcing things like "Enabled, L", trying to read the icon generated
with CSS.

Using text and replacing it with CSS with an icon solves the problem.

We could also use aria-label, but I prefer using "Yes/No" so the text
can be shown/hidden with CSS. Also useful when using
`save_and_open_page` during tests, since the displayed page will not
have any CSS rules applied.

Out of several existing techniques to hide text [1], we're setting the
font size to 1px in combination with moving the content off-screen
because that way we can override it in the `::before` element.

Just moving the content off-screen has the inconvenient of the content
still being taken into account when calculating the text indentation.

And just using a 1px font would make a 1px-sized square appear when
selecting text, which could confuse users.

[1] https://webaim.org/techniques/css/invisiblecontent/
2021-03-11 19:37:58 +01:00
..
2021-03-11 19:37:58 +01:00
2020-12-21 18:27:27 +01:00