raystack / raystack/apsara

[Label] Support ref as prop and add optional indicator

Open
#624 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component triage
Dominant language
TypeScript
Stars
70
Forks
13
Avg merge
2d 5h
Merged PRs (30d)
8

Description

Summary

Label is a custom semantic form label component with required field indicator support. Missing ref prop support and has accessibility gaps.

Improvements

1. Accept ref as a prop

Component uses plain function export and doesn't accept ref as a prop. Prevents parent components from accessing the DOM element.

5. Add optional indicator prop

InputField has optional?: boolean showing "(optional)" text. Label should have matching support for consistency.

6. Make aria-level configurable on Header

The header sub-component hardcodes aria-level={3}. Should be configurable.

Moved to Cross-Cutting Issues

The following items have been moved to cross-cutting issues that address them across all components:

  • Accessibility baseline (#673)
  • Add displayName (#676)

Files

  • packages/raystack/raystack/components/label/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/raystack/raystack/components/label/ and compare the Label API with InputField's optional prop behavior. Verify how the component currently renders its ref and Header aria-level, then consider the work complete when ref forwarding, optional text, and configurable aria-level are supported consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.