Skip to content

Commit

Permalink
[8.x] fix: [Search:AppSearch:Engines:Documents page]Customize documen…
Browse files Browse the repository at this point in the history
…t search modal dialog missing title from announcement (#202452) (#202510)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix: [Search:AppSearch:Engines:Documents page]Customize document
search modal dialog missing title from announcement
(#202452)](#202452)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T15:27:03Z","message":"fix:
[Search:AppSearch:Engines:Documents page]Customize document search modal
dialog missing title from announcement (#202452)\n\nCloses:
#202427\r\n\r\n## Description\r\nDialog modal visible title should be
announced for the users, especially\r\nusing assistive technology to
know what dialog modal, flyout opened.\r\n\r\n## Changes made:\r\n\r\n1.
aria-labelledby={modalTitleId} attribute was added for
mentioned\r\nEuiModal\r\n\r\n## Screen\r\n<img width=\"1135\"
alt=\"Screenshot 2024-12-02 at 14 43
16\"\r\nsrc=\"https://github.com/user-attachments/assets/ce319c22-1ae9-49e1-99e1-7670e5d97993\">","sha":"6b7d6478b09fbdd1283759d37a024add1cea8217","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"title":"fix:
[Search:AppSearch:Engines:Documents page]Customize document search modal
dialog missing title from
announcement","number":202452,"url":"https://github.com/elastic/kibana/pull/202452","mergeCommit":{"message":"fix:
[Search:AppSearch:Engines:Documents page]Customize document search modal
dialog missing title from announcement (#202452)\n\nCloses:
#202427\r\n\r\n## Description\r\nDialog modal visible title should be
announced for the users, especially\r\nusing assistive technology to
know what dialog modal, flyout opened.\r\n\r\n## Changes made:\r\n\r\n1.
aria-labelledby={modalTitleId} attribute was added for
mentioned\r\nEuiModal\r\n\r\n## Screen\r\n<img width=\"1135\"
alt=\"Screenshot 2024-12-02 at 14 43
16\"\r\nsrc=\"https://github.com/user-attachments/assets/ce319c22-1ae9-49e1-99e1-7670e5d97993\">","sha":"6b7d6478b09fbdd1283759d37a024add1cea8217"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202452","number":202452,"mergeCommit":{"message":"fix:
[Search:AppSearch:Engines:Documents page]Customize document search modal
dialog missing title from announcement (#202452)\n\nCloses:
#202427\r\n\r\n## Description\r\nDialog modal visible title should be
announced for the users, especially\r\nusing assistive technology to
know what dialog modal, flyout opened.\r\n\r\n## Changes made:\r\n\r\n1.
aria-labelledby={modalTitleId} attribute was added for
mentioned\r\nEuiModal\r\n\r\n## Screen\r\n<img width=\"1135\"
alt=\"Screenshot 2024-12-02 at 14 43
16\"\r\nsrc=\"https://github.com/user-attachments/assets/ce319c22-1ae9-49e1-99e1-7670e5d97993\">","sha":"6b7d6478b09fbdd1283759d37a024add1cea8217"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <[email protected]>
  • Loading branch information
kibanamachine and alexwizp authored Dec 2, 2024
1 parent d04aa2a commit a07583b
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
EuiModalFooter,
EuiModalHeader,
EuiModalHeaderTitle,
useGeneratedHtmlId,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';

Expand All @@ -44,6 +45,7 @@ export const CustomizationModal: React.FC<Props> = ({
sortFields,
}) => {
const { engine } = useValues(EngineLogic);
const modalTitleId = useGeneratedHtmlId();

const [selectedFilterFields, setSelectedFilterFields] = useState(
filterFields.map(fieldNameToComboBoxOption)
Expand All @@ -69,9 +71,9 @@ export const CustomizationModal: React.FC<Props> = ({
);

return (
<EuiModal onClose={onClose}>
<EuiModal onClose={onClose} aria-labelledby={modalTitleId}>
<EuiModalHeader>
<EuiModalHeaderTitle>
<EuiModalHeaderTitle id={modalTitleId}>
{i18n.translate(
'xpack.enterpriseSearch.appSearch.documents.search.customizationModal.title',
{
Expand Down Expand Up @@ -132,8 +134,11 @@ export const CustomizationModal: React.FC<Props> = ({
</EuiForm>
</EuiModalBody>
<EuiModalFooter>
<EuiButtonEmpty onClick={onClose}>{CANCEL_BUTTON_LABEL}</EuiButtonEmpty>
<EuiButtonEmpty data-test-subj="enterpriseSearchCustomizationModalButton" onClick={onClose}>
{CANCEL_BUTTON_LABEL}
</EuiButtonEmpty>
<EuiButton
data-test-subj="enterpriseSearchCustomizationModalButton"
fill
onClick={() => {
onSave({
Expand Down

0 comments on commit a07583b

Please sign in to comment.