npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

accessible-spinner-datepicker

v0.0.1

Published

An accessible spinner datepicker component

Downloads

1

Readme

accessible-spinner-calendar

An accessible spinner calendar component

Table of Contents:

Read me first: When would I use this

Many datepickers on the web are inaccessible. The APIs can be awkward (does accessibility: true make sense as a prop?), and the claims either go untested or left to wither as the person responsible for PRs moves to other projects.

Moreover, we believe that datepickers are not "one size fits all". A datepicker that works well for, say, Flight bookings, might not be the same as a flight search, which might not be the same as a date-of-birth input. This datepicker is no different!

Quite often, a simple text input is the more resilient approach to solving these prolems. If someone breaks accessibility guarantees, or a mode of input does not work with the component, at the very least people should be able to carry out their task. Thus, we want to enforce the text input, and then offer an enhanced interface on top.

We made it with the following goals

  • Be resilient, by always offering a text input;
  • Use a single interface across devices, instead of trying to split arbitrary mobile/tablet/desktop UIs;
  • Make an API that enforces Accessibility, and minimises caller error;
  • Expose our design, assumptions and user testing;
  • Encourage people to not use it if it does not fit their use case!

Design

Our initial design is based on the Spinner Datepicker by the ARIA Authoring Practices. We found it exposes the relevant states well. Note that the ARIA Authoring Practices is not the end-goal of this. We have an obligation to test the accessibility as well, and so does the caller of this library!

In addition to that, we want to enable multimodal operation for pointer touch operations. In other words, we want it possible for people to change the dates by touch, like in some native UI spinners. This might be a bad assumption, and we have to user test.

The Datepicker should make as few assumptions about the language, datetime format, and script, as it can.

Assumptions

These are things we assume, and should test.

  1. Multi-modal operation of spinners is desired, and not confusing
  2. Touch operation of spinners does not conflict with other modes of interaction. This is especially true when a piece of Assistive Technology is running.
  3. This Datepicker is more discoverable and operable than a Grid Calendar Datepicker (expandable by button or always present).

User tests

TBD after the prototype is done.

Getting started

You will need node and npm

npm install accessible-spinner-calendar

Then, in your relevant source file:

API Reference

Contributing

All contributors are required to abide by our Code of Conduct.

You will need [git], node and npm.

Then, in a terminal:

git clone https://github.com/fpapad/accessible-calendar-datepicker
npm ci
npm run dev

Code of Conduct

Thanks, Credits, Inspiration