Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ariaLabel method to Typescript #6582

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/lib/api/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,14 @@ export declare function localeOption(key: string, locale: string): any;
*/
export declare function localeOptions(locale: string): object;

/**
* Finds an ARIA label in the locale by key and replaces options if provided.
* @param {string} ariaKey - Key of the ARIA label to look up in the locale.
* @param {Object} options - JSON options like { page: 2, user: "John", role: "Admin" }.
* @returns {string} The ARIA label with replaced values.
*/
export declare function ariaLabel(ariaKey: string, options: any): string;

// Locale Options
export interface LocaleOptions {
/**
Expand Down
Loading