Skip to content

First Time Buyer and Previous Patterns are not focusable #343

@brooksbecton

Description

@brooksbecton

Describe the bug
The radio buttons for the "First Time Buyer" and "Previous Patterns" are not focusable because the actual radio button is not being displayed.

.input__radio-buttons input[type=radio] {
  display: none;
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://turnipprophet.io/
  2. Press Tab
  3. The browsers focus goes to the first open input

Expected behavior
The 'First Time Buyer' and 'Previous Patterns' radio buttons are focusable. Someone should be able to 'tab' into those inputs

Additional context
The inputs should be focusable so that users who use assistive technology can interact with them.
They aren't currently focusable because they aren't being displayed. Browsers will do some checking to see if the the HTML element is supposed to be there (this is where display:none is messing it up) and will ignore anything that isn't going to be displayed.

If you delete that line in the css, the radio buttons will come back and this fixes the issue, but it messes up the page visually. I tried to use opacity: 0 to compromise, but still had no luck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIUser Interface IssuesbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions