fix: [Platform:StackManagement:Kibana:Spaces] Assign roles to a space flyout announced incorrectly (#218576)

Closes: #218351

**Description**
When user clicks on assign new roles to a space button, the resulting
flyout gets announced incorrectly as "you are in a modal dialog..."
which doesn't give any context to non-sighted user.

**Changes made:**
1. added 'aria-labelledby' attribute

**Screen:**
<img width="1323" alt="image"
src="https://github.com/user-attachments/assets/63ffdcca-2139-4302-9dce-ded3a4d3b9a2"
/>
This commit is contained in:
Alexey Antonov 2025-04-17 21:52:56 +03:00 committed by GitHub
parent a7be37e1cd
commit 78bf949dbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -106,6 +106,7 @@ export const EditSpaceAssignedRolesTab: FC<Props> = ({ space, features, isReadOn
size: 'm',
maxWidth: true,
maskProps: { headerZindexLocation: 'below' },
'aria-labelledby': 'space-assign-role-privilege-form-title',
}
);
},

View file

@ -663,7 +663,7 @@ export const PrivilegesRolesForm: FC<PrivilegesRolesFormProps> = (props) => {
<React.Fragment>
<EuiFlyoutHeader hasBorder>
<EuiTitle size="m">
<h2>
<h2 id="space-assign-role-privilege-form-title">
{isEditOperation.current
? i18n.translate('xpack.spaces.management.spaceDetails.roles.assignRoleButton', {
defaultMessage: 'Edit role privileges for space',