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

CommentFileSizeAuthor
#10 Screenshot 2022-03-16 at 16.53.56.png29.19 KBAgamich
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kingdutch created an issue. See original summary.

Kingdutch’s picture

Issue summary: View changes
Agamich’s picture

Status: Active » Needs review
Agamich’s picture

navneet0693’s picture

Update: Only socialbase: https://git.drupalcode.org/project/socialbase/-/merge_requests/35 needs to be merged now.

Agamich’s picture

Merge conflicts were fixed.

Kingdutch’s picture

Status: Needs review » Needs work

Hey 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?

Agamich’s picture

Hey 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.

Agamich’s picture

Assigned: Unassigned » Agamich
Status: Needs work » Active
Agamich’s picture

Hey 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?

Kingdutch’s picture

The 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.

Agamich’s picture

for the result:

  1. I can merge improvements that we have on PR?
  2. Remove custom styles for all links
Agamich’s picture

Assigned: Agamich » Unassigned
Status: Active » Needs review
Agamich’s picture

Status: Needs review » Fixed

Both PR's (socialblue and socialbase themes) were merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.