Skip to content

Commit f9e80f6

Browse files
committed
Changes from node scripts/check
1 parent 8b76c49 commit f9e80f6

3 files changed

Lines changed: 85 additions & 36 deletions

File tree

x-pack/platform/plugins/shared/security/public/management/role_mappings/edit_role_mapping/rule_editor_panel/field_rule_editor.tsx

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,29 @@ export class FieldRuleEditor extends Component<Props, {}> {
156156
<EuiFlexItem grow={false}>
157157
<EuiFormRow hasEmptyLabelSpace={true}>
158158
{this.props.readOnly === false && renderAddValueButton ? (
159-
<EuiButtonIcon
160-
iconSize="s"
161-
iconType="plusCircle"
162-
onClick={this.onAddAlternateValue}
163-
color="primary"
164-
data-test-subj="addAlternateValueButton"
165-
aria-label={i18n.translate(
159+
<EuiToolTip
160+
content={i18n.translate(
166161
'xpack.security.management.editRoleMapping.fieldRuleEditor.addAlternateValueButton',
167162
{
168163
defaultMessage: 'Add alternate value',
169164
}
170165
)}
171-
/>
166+
disableScreenReaderOutput
167+
>
168+
<EuiButtonIcon
169+
iconSize="s"
170+
iconType="plusCircle"
171+
onClick={this.onAddAlternateValue}
172+
color="primary"
173+
data-test-subj="addAlternateValueButton"
174+
aria-label={i18n.translate(
175+
'xpack.security.management.editRoleMapping.fieldRuleEditor.addAlternateValueButton',
176+
{
177+
defaultMessage: 'Add alternate value',
178+
}
179+
)}
180+
/>
181+
</EuiToolTip>
172182
) : (
173183
<EuiIcon size="s" type="empty" aria-hidden={true} />
174184
)}
@@ -182,19 +192,29 @@ export class FieldRuleEditor extends Component<Props, {}> {
182192
<EuiFlexItem grow={1}>
183193
<EuiFormRow hasEmptyLabelSpace={true}>
184194
{this.props.readOnly === false ? (
185-
<EuiButtonIcon
186-
iconType="trash"
187-
color="danger"
188-
iconSize="s"
189-
data-test-subj={`fieldRuleEditorDeleteValue fieldRuleEditorDeleteValue-${valueIndex}`}
190-
aria-label={i18n.translate(
195+
<EuiToolTip
196+
content={i18n.translate(
191197
'xpack.security.management.editRoleMapping.fieldRuleEditor.deleteValueLabel',
192198
{
193199
defaultMessage: 'Delete value',
194200
}
195201
)}
196-
onClick={() => this.onRemoveAlternateValue(valueIndex)}
197-
/>
202+
disableScreenReaderOutput
203+
>
204+
<EuiButtonIcon
205+
iconType="trash"
206+
color="danger"
207+
iconSize="s"
208+
data-test-subj={`fieldRuleEditorDeleteValue fieldRuleEditorDeleteValue-${valueIndex}`}
209+
aria-label={i18n.translate(
210+
'xpack.security.management.editRoleMapping.fieldRuleEditor.deleteValueLabel',
211+
{
212+
defaultMessage: 'Delete value',
213+
}
214+
)}
215+
onClick={() => this.onRemoveAlternateValue(valueIndex)}
216+
/>
217+
</EuiToolTip>
198218
) : (
199219
<EuiIcon size="s" type="empty" aria-hidden={true} />
200220
)}

x-pack/platform/plugins/shared/security/public/management/roles/edit_role/privileges/kibana/privilege_summary/privilege_summary_table.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,19 @@ export const PrivilegeSummaryTable = (props: PrivilegeSummaryTableProps) => {
126126
return null;
127127
}
128128
return (
129-
<EuiButtonIcon
130-
onClick={() => toggleExpandedFeature(featureId)}
131-
data-test-subj={`expandPrivilegeSummaryRow`}
132-
aria-label={expandedFeatures.includes(featureId) ? 'Collapse' : 'Expand'}
133-
iconType={expandedFeatures.includes(featureId) ? 'chevronSingleUp' : 'chevronSingleDown'}
134-
/>
129+
<EuiToolTip
130+
content={expandedFeatures.includes(featureId) ? 'Collapse' : 'Expand'}
131+
disableScreenReaderOutput
132+
>
133+
<EuiButtonIcon
134+
onClick={() => toggleExpandedFeature(featureId)}
135+
data-test-subj={`expandPrivilegeSummaryRow`}
136+
aria-label={expandedFeatures.includes(featureId) ? 'Collapse' : 'Expand'}
137+
iconType={
138+
expandedFeatures.includes(featureId) ? 'chevronSingleUp' : 'chevronSingleDown'
139+
}
140+
/>
141+
</EuiToolTip>
135142
);
136143
},
137144
};

x-pack/platform/plugins/shared/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_table.tsx

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,38 +224,60 @@ export class PrivilegeSpaceTable extends Component<Props, State> {
224224
{
225225
render: (record: TableRow) => {
226226
return (
227-
<EuiButtonIcon
228-
aria-label={i18n.translate(
227+
<EuiToolTip
228+
content={i18n.translate(
229229
'xpack.security.management.editRole.spacePrivilegeTable.editPrivilegesLabel',
230230
{
231231
defaultMessage: `Edit privileges for the following spaces: {spaceNames}.`,
232232
values: { spaceNames: record.spaces.map((s) => s.name).join(', ') },
233233
}
234234
)}
235-
color={'primary'}
236-
iconType={'pencil'}
237-
onClick={() => this.props.onEdit(record.privilegeIndex)}
238-
data-test-subj={`privilegeEditAction-${record.privilegeIndex}`}
239-
/>
235+
disableScreenReaderOutput
236+
>
237+
<EuiButtonIcon
238+
aria-label={i18n.translate(
239+
'xpack.security.management.editRole.spacePrivilegeTable.editPrivilegesLabel',
240+
{
241+
defaultMessage: `Edit privileges for the following spaces: {spaceNames}.`,
242+
values: { spaceNames: record.spaces.map((s) => s.name).join(', ') },
243+
}
244+
)}
245+
color={'primary'}
246+
iconType={'pencil'}
247+
onClick={() => this.props.onEdit(record.privilegeIndex)}
248+
data-test-subj={`privilegeEditAction-${record.privilegeIndex}`}
249+
/>
250+
</EuiToolTip>
240251
);
241252
},
242253
},
243254
{
244255
render: (record: TableRow) => {
245256
return (
246-
<EuiButtonIcon
247-
aria-label={i18n.translate(
257+
<EuiToolTip
258+
content={i18n.translate(
248259
'xpack.security.management.editRole.spacePrivilegeTable.deletePrivilegesLabel',
249260
{
250261
defaultMessage: `Delete privileges for the following spaces: {spaceNames}.`,
251262
values: { spaceNames: record.spaces.map((s) => s.name).join(', ') },
252263
}
253264
)}
254-
color={'danger'}
255-
iconType={'trash'}
256-
onClick={() => this.onDeleteSpacePrivilege(record)}
257-
data-test-subj={`privilegeDeleteAction-${record.privilegeIndex}`}
258-
/>
265+
disableScreenReaderOutput
266+
>
267+
<EuiButtonIcon
268+
aria-label={i18n.translate(
269+
'xpack.security.management.editRole.spacePrivilegeTable.deletePrivilegesLabel',
270+
{
271+
defaultMessage: `Delete privileges for the following spaces: {spaceNames}.`,
272+
values: { spaceNames: record.spaces.map((s) => s.name).join(', ') },
273+
}
274+
)}
275+
color={'danger'}
276+
iconType={'trash'}
277+
onClick={() => this.onDeleteSpacePrivilege(record)}
278+
data-test-subj={`privilegeDeleteAction-${record.privilegeIndex}`}
279+
/>
280+
</EuiToolTip>
259281
);
260282
},
261283
},

0 commit comments

Comments
 (0)