Skip to content

Prevent radio buttons from selecting when focused by keyboard #859

Open
@pmarsh-scottlogic

Description

@pmarsh-scottlogic

Bug report

Description

Regarding radio buttons under sandbox -> Defence Configuration -> Prompt enclosure, if you keyboard-navigate through the options (using the up/down arrows), the button you have just navigated to will automatically get selected. What should happen instead is it doesn't get selected until the user presses the space key.

Reproduction steps

Steps to reproduce the behaviour:

  1. Load the app and go to sandbox
  2. Open Defence Configuration and Prompt Enclosure
  3. Keyboard-navigate to the radio buttons
  4. Use the up-down arrow keys to navigate to different options
  5. Observe that the focused option gets selected

Expected behaviour

A focused radio button should not get selected UNTIL the user presses the space key

Screenshots

These radio buttons 'ere

Image

Software (please complete the following information):

  • Browser: chrome

Additional context

Add any other context about the problem here.

Acceptance criteria

GIVEN Keyboard navigating through the Prompt Enclosure radio buttons part of the Defence Configuration panel.
WHEN User uses the up/down arrow key to focus a different radio button
THEN the new radio button is focused AND NOT selected

GIVEN User has focused radio button AND not selected it yet
WHEN they press the space key
THEN the focused radio button becomes selected

Metadata

Metadata

Labels

bugSomething isn't workingfrontendRequires work on the frontendtriageNew tickets to be checked by the maintainers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions