Skip to content

aria-label attributes for fields with custom labels #2427

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

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/admin/navigation/navigationItemModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ export class NavigationItemModal extends React.Component<NavigationItemModalProp
info={`Assign to an existing menu item or select new menu item to create a top-level menu item.`}
/>
}
ariaLabel="Assign location"
placeholder="Click to select a parent..."
options={this.state.navItemsDropdown}
defaultSelectedKey={this.state.parentItem !== '' ? this.state.parentItem : newItemKey}
Expand Down
3 changes: 3 additions & 0 deletions src/admin/pages/pageDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export class PageDetailsModal extends React.Component<PageDetailsModalProps, Pag
info="This is how the page name will be displayed in the site menu."
required
/>}
ariaLabel="Name"
value={this.state.page.title}
onChange={(event, newValue) => this.onInputChange('title', newValue, REQUIRED)}
errorMessage={this.state.errors['title'] ?? ''}
Expand All @@ -218,6 +219,7 @@ export class PageDetailsModal extends React.Component<PageDetailsModalProps, Pag
required
/>
}
ariaLabel="Permalink path"
value={this.state.page.permalink}
onChange={(event, newValue) => this.onInputChange('permalink', newValue)}
errorMessage={this.state.errors['permalink'] ?? ''}
Expand All @@ -226,6 +228,7 @@ export class PageDetailsModal extends React.Component<PageDetailsModalProps, Pag
/>
<TextField
onRenderLabel={() => <LabelWithInfo label="Description" info="This description helps search engines and users understand the content and purpose of this page." />}
ariaLabel="Description"
multiline
autoAdjustHeight
value={this.state.page.description}
Expand Down
1 change: 1 addition & 0 deletions src/admin/pages/pageLayoutDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export class PageLayoutDetailsModal extends React.Component<PageLayoutModalProps
required
/>
}
ariaLabel="Permalink path template"
value={this.state.layout.permalinkTemplate}
onChange={(event, newValue) => this.onInputChange('permalinkTemplate', newValue)}
errorMessage={this.state.errors['permalinkTemplate'] ?? ''}
Expand Down