-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(generic): improve action buttons #696
base: main
Are you sure you want to change the base?
Conversation
- adapt use of icons vs. text for accessibility - move colors to static file to allow overriding - switch to color variables from Bootstrap "context" keywords - replace hardcoded CSS for table cells with class
In theory yes, agree. But I don't think anyone has the resources to do that. I certainly don't, so would opt for doing this bit by bit. E.g. there are some defaults we don't explicitly set, which would need changing, like the main link colour. But then there are also these variable keywords that Bootstrap provides ("warning" etc.), which we could ignore in favour of custom variables (setup of which would require more frontend work). The colour contrast thing I did here is just a little thing, colours in general would also need checking against e.g. red-green colour blindness. And while I was looking at the button colours against the (striped) table, which is meant to make the rows easier to differentiate, I noticed that the stripes aren't implemented in the best way, either. Doh! And e.g. ARIA attributes are their own (huge) topic again. I haven't looked into how well (or not) Bootstrap supports them (that is, out of the box). |
I wasn't actually planning to add more to this, so un-drafting. But... should I split this into smaller PRs? Idk, maybe one just for the switch from hard-coded stuff to CSS classes that can be overridden? Then another one for the proposed changes to the current CSS? |
Also, not sure sure if the changes in |
I'd propose the following:
to use it |
Tbh, I couldn't quite figure out how either styles or scripts are supposed to be added – I saw the blocks for Side note: this reminds me I actually already moved a few things into separate Ok, so one css file where we collect everything together for now. Any naming preferences? I've seen |
Maybe |
I'd call it |
This is a first attempt at improving the action buttons. Can be split into smaller PRs if that's better.
What this currently does is:
a
,td
) with classes to allow easier overriding,like all other linksmore nicely,apis_entities
to green because it actually adds new content,If we offered a way to switch the accessibility level of the APIS interface (haven't seen them in a while, but know that gov websites used to have e.g. buttons labelled "AA", "AAA"), the "duller" looking colours could be kept in separate stylesheets. I'm actually assuming there are projects which have to fulfil certain accessibility criteria due to how they are funded (?!), so I'm wondering if we shouldn't actually develop for accessibility out of the box.