Problem/Motivation
We've implemented behaviour that removes the default browser focus outline (search for outline: 0
for examples).
However, the alternative we implement to indicate keyboard focus states does not always pass accessibility guidelines. An example of this can be seen on the login button, both with the default Open Social colors as well as with custom brand colors.
The user login and create post forms are good examples of where such elements are used. The dropdown for contextual actions on activities and the "back to inbox" button in private messages are other interactive elements that need this change. There are probably more interactive elements not listed here.
Steps to reproduce
Proposed resolution
Finding different focus styles that fit within our current customisation abilities is very difficult. Therefor we propose to re-instate the default focus indicator. This isn't as pretty but is a lot clearer for people who use the keyboard to navigate Open Social.
Undo all removal of focus outlines on interact-able elements (e.g. buttons, links, dropdowns, etc.) and ensure the default browser focus is shown.
Remaining tasks
User interface changes
The default browser outline style is now shown when a user uses the keyboard to focus an interactable element. This styling does not respect platform branding.
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#10 | Screenshot 2022-03-16 at 16.53.56.png | 29.19 KB | Agamich |
Comments
Comment #2
KingdutchComment #3
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedI've added improvements on these MR's:
socialbase: https://git.drupalcode.org/project/socialbase/-/merge_requests/35
socialblue: https://git.drupalcode.org/project/socialblue/-/merge_requests/27
Comment #4
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedhttps://git.drupalcode.org/project/socialblue/-/merge_requests/27 - This MR was merged in 1.2.x branch
Comment #5
navneet0693 CreditAttribution: navneet0693 as a volunteer and at Open Social for Open Social commentedUpdate: Only socialbase: https://git.drupalcode.org/project/socialbase/-/merge_requests/35 needs to be merged now.
Comment #6
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedMerge conflicts were fixed.
Comment #7
KingdutchHey Agami,
If I look at the code then we're adding more styles. However, if I look at the issue summary then I expect us to throw CSS away (to remove our custom outlines and use the outlines from the browser).
Can you explain why we're adding more styles rather than removing the styles that cause the problems in the first place?
Comment #8
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedHey Kingdutch, thanks for the comment, on our first discussion we decided to add improvements to the focus indicator to the styles that we have. I did not test the case with deleting out custom styles. I'll check it.
Comment #9
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedComment #10
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedHey Kingdutch, according to your last comment, I've checked the behavior of the link elements on focus. I removed(on the local env) `focus` custom styles for the links elements and everything looks good, but we have some cases where the link element has `overflow: hidden` styles. The default highlighter does not look good(see screenshot)
If this behavior is good for you, I can remove all custom `focus` styles for all links. We will leave `focus`styles only for the form elements and buttons. What do you think about it?
Comment #11
KingdutchThe hidden on the heading makes the display not great. Though I also think that removing that hiding will give us more headaches for now. So I'd say we go with what you proposed for now. We can improve it when we revisit this in rebuilding the teasers for decoupled.
Comment #12
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedfor the result:
Comment #13
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedComment #14
Agamich CreditAttribution: Agamich as a volunteer and at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedBoth PR's (socialblue and socialbase themes) were merged.