Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

[MDCSelect] element with display: none prevents keyboard navigationΒ #6770

Closed
@jkevingutierrez

Description

Bug report

Having some mdc-list-item with display: none; prevents arrow keyboard navigation to the next element.

Steps to reproduce

https://codepen.io/jkevingutierrez/pen/OJRdGaw

  1. Follow https://material.io/develop/web/components/input-controls/select-menus but add style="display: none;" to some element (except the last one)
  2. Open the MDCSelect
  3. Navigate using the arrow keyboards
  4. See the error

Actual behavior

Having some element focused, if the next element has style="display: none;" the user won't be able to go to the next element using the down arrow

Expected behavior

Navigating with arrows shouldn't be affected for having some element with display: none

Screenshots

Your Environment:

Software Version(s)
MDC Web 10.0
Browser Chrome Version 87.0.4280.141 (Official Build) (x86_64)
Operating System macOS BigSur

Additional context

Possible solution

  • When navigating with arrows, it should check for the next/previous visible element instead of the next/previous element

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.feature-request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions