Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Retain error/success border size and colour on :active state #1156

Merged
merged 7 commits into from
Nov 19, 2021

Conversation

ob6160
Copy link
Contributor

@ob6160 ob6160 commented Nov 8, 2021

What is the purpose of this change?

We would like the border transition on :active to not happen when these components are in an error or success state.

This gif demonstrates the current behaviour (clicking on the input to trigger :active):
out

What does this change?

This changes the behaviour so that when the select, text area and input:active state is activated and they are in error or success states the border remains the same.

Accessibility

We had some discussions around the impact of this change upon accessibility. Namely, showing a flash of activation for keyboard/mouse users. The standard tab focus outer border will still work with this change. It would be interesting to hear peoples' opinion on this.

Perhaps, when the :active state is activated we could show a different shade of the error colour. Something like an errorBorderActiveColour?

@ob6160 ob6160 requested a review from a team as a code owner November 8, 2021 12:58
@github-actions github-actions bot added Select Changes to the select component Text area Changes to the text area component Text input Changes to the text input component labels Nov 8, 2021
@ob6160 ob6160 force-pushed the ob/error-success-active-state branch from ee4845f to cd3cba8 Compare November 8, 2021 13:06
@ob6160 ob6160 changed the title fix: retain error/success border size and colour on :active state Retain error/success border size and colour on :active state Nov 8, 2021
@ob6160 ob6160 changed the title Retain error/success border size and colour on :active state Retain error/success border size and colour on :active state Nov 8, 2021
@ob6160 ob6160 self-assigned this Nov 8, 2021
Copy link
Contributor

@SiAdcock SiAdcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ob6160, sorry for the delay in reviewing. This looks awesome! I'll raise with Akemi the point about whether we should have a different :active border colour for fields in an error/success state

@SiAdcock SiAdcock merged commit 5b2b2a6 into main Nov 19, 2021
@SiAdcock SiAdcock deleted the ob/error-success-active-state branch November 19, 2021 09:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Select Changes to the select component Text area Changes to the text area component Text input Changes to the text input component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants