Skip to content

Commit 43f34bd

Browse files
authored
aria-label attributes for fields with custom labels (#2427)
1 parent 4cb8563 commit 43f34bd

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/admin/navigation/navigationItemModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ export class NavigationItemModal extends React.Component<NavigationItemModalProp
683683
info={`Assign to an existing menu item or select new menu item to create a top-level menu item.`}
684684
/>
685685
}
686+
ariaLabel="Assign location"
686687
placeholder="Click to select a parent..."
687688
options={this.state.navItemsDropdown}
688689
defaultSelectedKey={this.state.parentItem !== '' ? this.state.parentItem : newItemKey}

src/admin/pages/pageDetailsModal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ export class PageDetailsModal extends React.Component<PageDetailsModalProps, Pag
205205
info="This is how the page name will be displayed in the site menu."
206206
required
207207
/>}
208+
ariaLabel="Name"
208209
value={this.state.page.title}
209210
onChange={(event, newValue) => this.onInputChange('title', newValue, REQUIRED)}
210211
errorMessage={this.state.errors['title'] ?? ''}
@@ -218,6 +219,7 @@ export class PageDetailsModal extends React.Component<PageDetailsModalProps, Pag
218219
required
219220
/>
220221
}
222+
ariaLabel="Permalink path"
221223
value={this.state.page.permalink}
222224
onChange={(event, newValue) => this.onInputChange('permalink', newValue)}
223225
errorMessage={this.state.errors['permalink'] ?? ''}
@@ -226,6 +228,7 @@ export class PageDetailsModal extends React.Component<PageDetailsModalProps, Pag
226228
/>
227229
<TextField
228230
onRenderLabel={() => <LabelWithInfo label="Description" info="This description helps search engines and users understand the content and purpose of this page." />}
231+
ariaLabel="Description"
229232
multiline
230233
autoAdjustHeight
231234
value={this.state.page.description}

src/admin/pages/pageLayoutDetailsModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export class PageLayoutDetailsModal extends React.Component<PageLayoutModalProps
187187
required
188188
/>
189189
}
190+
ariaLabel="Permalink path template"
190191
value={this.state.layout.permalinkTemplate}
191192
onChange={(event, newValue) => this.onInputChange('permalinkTemplate', newValue)}
192193
errorMessage={this.state.errors['permalinkTemplate'] ?? ''}

0 commit comments

Comments
 (0)