Visitar URL original
USWDS - Disabled styles: Apply consistent styles to disabled elements · Issue #5051 · uswds/uswds · GitHub
Skip to content

USWDS - Disabled styles: Apply consistent styles to disabled elements #5051

Description

@mahoneycm

Is your feature request related to a problem? Please describe.

Related to #5004 & #4913

Disabled styles are not consistent across browsers and can cause visual confusion for users

Describe the solution you'd like

Add disabled modifier to other form elements to ensure consistent styling across disabled forms.

Describe alternatives you've considered

No response

Additional context

Screenshots go from Active inputs, default styles when disabled, new styles with USWDS disabled (Chrome)
image

Other browsers lack disabled styles so there is no indication that the element is disabled other than it is not focusable. Example from safari:
Screen Shot 2022-11-22 at 3 30 00 PM

Code of Conduct

Activity

  1. added
    Type: Feature RequestCompatibility label; native Enhancement type is authoritative. Retained for templates/search links.
    on Nov 22, 2022
  2. self-assigned this
    on Nov 22, 2022
  3. amyleadem commented on Nov 23, 2022

    @amyleadem
    Contributor

    Just a note - When reviewing #5004, I noticed that the gray value is inconsistent in our various disabled styles (see image below). This could be a good opportunity to standardize our disabled color choices for a more consistent user experience.

    Additionally, we should consider adding cursor: not-allowed to all our disabled items.

    image

  4. mahoneycm commented on Nov 25, 2022

    @mahoneycm
    ContributorAuthor

    @amyleadem originally I chose disabled-light for the disabled color because it was closer to the styles Chrome and Edge apply to disabled inputs. We could easily change this to disabled to make them consistent with the other disabled states. I am curious how color contrast plays into disabled options. Currently, our disabled colors for the checkboxes and the disabled button does not meet WCAG color contrast minimums.

  5. mahoneycm commented on Nov 25, 2022

    @mahoneycm
    ContributorAuthor

    Good news, inactive items are not required to meet color contrast standards:

    Incidental: Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement. 1

    Footnotes

    1. https://www.w3.org/TR/WCAG22/#contrast-minimum:~:text=least%203%3A1%3B-,Incidental,picture%20that%20contains%20significant%20other%20visual%20content%2C%20have%20no%20contrast%20requirement.,-Logotypes ↩

  6. moved this from In progress to Review in USWDS Core Project Dataon Dec 9, 2022
  7. added this to the uswds 3.4.0 milestone on Dec 21, 2022
  8. assigned and unassigned on Dec 29, 2022
  9. changed the title [-]USWDS - Feature: Add disabled styles to other form inputs.[/-] [+]USWDS - Disabled styles: Apply consistent styles to disabled elements[/+] on Mar 23, 2023
  10. moved this from Review to Fed Final Review in USWDS Core Project Dataon Apr 6, 2023
  11. moved this from Fed Final Review to Done in USWDS Core Project Dataon May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: Feature RequestCompatibility label; native Enhancement type is authoritative. Retained for templates/search links.

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions