Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

basic-list-box

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-list-box

A single-selection list box that supports selection highlighting (using the system highlight color) and keyboard navigation.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

basic-list-box

A single-selection list box that supports selection highlighting (using the system highlight color) and keyboard navigation.

The user can select an item with the mouse/touch or keyboard: Up/Down, Page Up/Down, Home/End.

Like other Basic Web Components, this can handle distributed content: you can include a content element inside a basic-list-box, and the list will navigate through the distributed content. Note: for the time being, if you do use basic- list-box inside your own component, it appears that you'll need to wire up your own keyboard navigation, and forward the list navigation keys to the basic-list- box.

This component includes basic ARIA support to provide a reasonable default experience, e.g., for screen readers. The list component itself will be assigned an appropriate ARIA role (default is "listbox"). The ID of the selected item will be reflected in an "aria-activedescendant" attribute applied to the list. To support this feature, all items in the list need unique IDs. If an item does not have an ID, basic-list-box will automatically assign a default ID.

The keyboard interaction model generally follows that of Microsoft Windows' list boxes instead of those in OS X:

  • The Page Up/Down and Home/End keys actually move the selection, rather than just scrolling the list. The former behavior seems more generally useful for keyboard users.

  • Pressing Page Up/Down will move the selection to the topmost/bottommost visible item if the selection is not already there. Thereafter, the key will move the selection up/down by a page, and (per the above point) make the selected item visible.

Programmatically selecting an item (by setting the selected property) scrolls the item into view.

The user can also select an item by typing the beginning of an item's text.

Keywords

FAQs

Package last updated on 12 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc