Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Possibly controversial: Fix file upload focus in FF
Fix an existing undocumented issue where file upload component doesn't display focus indicator in Firefox (in standard or inverted colours mode). Underlying issue reported here: https://bugzilla.mozilla.org/show_bug.cgi?id=1430196 The focus state can be made to display in FF with `focus-within`. Unfortunately `focus-within` cannot be set together with `:focus` (to reduce duplication) as all versions of IE fail to recognise `focus-within` and don't set any styles from the block if `focus-within` is a selector. It's therefore set separately in the SASS. Also manually emulate styles from `govuk-focusable` for file upload in FF. Alternatively `govuk-focusable` mixin could be made to accept a new `$focusable-within` param that adds the `focus-within` styles. However from API point of view this it might be unclear whether the mixin adds both `focus` and `focus-within` styles if the param is set or just one or the other. Alternatively, a new mixin `govuk-focusable-within` mixin could be created but since `focus-within` has poor browser support (no IE or Edge) it seems preferable not to make it part of public API as someone might mistakenly use it instead of `govuk-focusable`.
- Loading branch information