Skip to content

Extending aria-label in CalendarCell #9735

@cbodin

Description

@cbodin

Provide a general summary of the feature here

Allow for some way to extend the aria-label of a CalendarCell without using the render prop.

🤔 Expected Behavior?

A prop or something else for adding extra strings to the aria-label of a CalendarCell.

😯 Current Behavior

Currently the only way i found was to override the render function of the CalendarCell but that would mean re-implementing all the aria-label translations for all the different states a cell can be in.

💁 Possible Solution

Maybe add an additional prop to add some extra context to the aria label? That could be inserted before the "current"/"First available date" text?

extraAriaLabelContext?: string;

`Wednesday, February 5, 2020, ${extraAriaLabelContext} selected`
`Thursday, March 5, 2026, ${extraAriaLabelContext} First available date`

That would allow for a string like:
Wednesday, February 5, 2020, 19 euro, selected

🔦 Context

I'm trying to add additional data in each CalendarCell. More precisely, prices.

💻 Examples

Image

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions