Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat(aria/spinbutton): Add spinbutton primitive for value selection within discrete ranges

未关闭
#32,664 4 条评论 5 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@ok7sai 已经在做这个了。

开始于 2026年4月1日。

评估

这个 Issue 还没有评估数据。

描述

area: cdk/a11y feature P3
Feature Description

Angular Aria currently lacks a spinbutton primitive.
The APG Spinbutton Pattern defines it as an input widget that restricts its value to a set or range of discrete values.

Keyboard Interaction (per APG)
Key Function
Up Arrow Increases the value
Down Arrow Decreases the value
Home Sets value to minimum (if defined)
End Sets value to maximum (if defined)
Page Up Increases value by larger step (optional)
Page Down Decreases value by larger step (optional)
Required ARIA Attributes
  • role="spinbutton" on the focusable element
  • aria-valuenow - Current value
  • aria-valuemin / aria-valuemax - Min/max allowed values
  • aria-valuetext - User-friendly string (e.g., "Monday" instead of "1")
  • aria-labelledby or aria-label - Accessible name
  • aria-invalid="true" - When value is outside allowed range
References

APG Specification

React Aria Prior Art

React Aria uses spinbuttons internally for date/time segment navigation:

Implementation

PR: https://github.com/angular/components/pull/32663

Use Case
  1. Quantity Selection - Hotel booking, shopping carts, product pages
  2. Time Input - Time pickers with hours, minutes, seconds segments
  3. Date Picker Components - Date range selectors using spinbuttons for date segments
  4. Toolbar Controls - Font size and property controls in text editors
  5. Numeric Input with Constraints - Any value selection within a min/max range
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 5 小时
30 天内合并 PR
67

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/components 的其他 Issue

查看 angular/components 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。