Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security Solution] [Security Assistant] Fixes Security Assista…
…nt accessibility (a11y) issues (#207122) (#207895) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues (#207122)](#207122) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Andrew Macri","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-22T18:06:54Z","message":"[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues (#207122)\n\n### [Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues\r\n\r\nThis PR fixes the following Security Assistant accessibility (a11y) issues:\r\n\r\n- <#206348> - _The ai assistant settings and actions button is announced wrong_\r\n- <#206362> - _Close button on View in AI assistant is missing discernible text_\r\n- <#206875> - _Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled_\r\n\r\n### Details\r\n\r\n#### [206348](#206348) - The ai assistant settings and actions button is announced wrong\r\n\r\nThis issue was resolved by adding an `aria-label` to the assistant settings context menu.\r\n\r\nThis fix was desk tested using Voiceover, as illustrated by the following screenshots:\r\n\r\n**Before:**\r\n\r\n![voiceover_before_206348](https://github.com/user-attachments/assets/92106bd9-b651-447e-b5dd-f59323288534)\r\n\r\n**After:**\r\n\r\n![voiceover_after_206348](https://github.com/user-attachments/assets/da580121-fab1-47e8-ae7b-41fd6d0008ca)\r\n\r\nDesk testing: see [206348](#206348) for reproduction steps\r\n\r\n#### [206362](#206362) - Close button on View in AI assistant is missing discernible text\r\n\r\nThis issue was resolved by adding an `aria-label` to the assistant close button.\r\n\r\nThis fix was desk tested using Axe, as illustrated by the following screenshots:\r\n\r\n**Before:**\r\n\r\n![axe_before_206362](https://github.com/user-attachments/assets/21503311-a9e0-402f-9ee0-333ad6d6171a)\r\n\r\n**After:**\r\n\r\n![axe_after_206362](https://github.com/user-attachments/assets/54565a48-4285-47f2-b3fd-3709feb9b57c)\r\n\r\nDesk testing: see [206362](#206362) for reproduction steps\r\n\r\n#### [206875](#206875) - Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled\r\n\r\nIssue [206875](#206875) includes the following statement:\r\n\r\n> Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets disabled. All it says right now \"show anonymized\"\r\n\r\nThe first part of the statement above:\r\n\r\n> Anonymization button doesn't get announced\r\n\r\nappears to be in reference to when the Anonymization toggle button is disabled. This is unfortunately expected, because screen readers do NOT announce disabled buttons, as described in articles like <https://css-tricks.com/making-disabled-buttons-more-inclusive/>\r\n\r\nThe second part of the statement above:\r\n\r\n> doesn't have enough context in the tooltip about when it gets enabled\r\n\r\nis addressed by this PR, though there is still a quirk described in detail below.\r\n\r\nIn this PR, when a conversation does NOT have replacements, a new (different) tooltip is displayed, as illustrated by the before / after screenshots below:\r\n\r\n**Before:**\r\n\r\n![empty_before_206875](https://github.com/user-attachments/assets/682f6269-d3db-40ee-877e-e877e9b1ae31)\r\n\r\n_Above: Before the fix, the tooltip for the disabled button reads:_ `Show anonymized`\r\n\r\n**After:**\r\n\r\n![empty_after_206875](https://github.com/user-attachments/assets/1eed6a88-c3d2-424a-abc0-ef45b9ee41d5)\r\n\r\n_Above: After the fix, the tooltip for the disabled button reads:_ `This conversation does not include anonymized fields`\r\n\r\nNote that there is still a quirk with the button, which is not addressed by this fix:\r\n\r\nThe current implementation enables the `Show anonymized` button when the conversation has _any_ replacements, regardless of whether or not the replacements are applicable to the rendered conversation. As a result, when replacements are present, but not applicable to the rendered conversation, the user may toggle the enabled button, but will not observe any changes to the rendered conversation.\r\n\r\nAlternatively, the replacements could be applied to the conversation before rendering to facilitate a comparison: If the original conversation and applied conversation are identical, the anonymization button should be disabled. If they are the different, the button should be enabled. This alternative was NOT implemented in this PR.\r\n\r\nDesk testing: see [206875](#206875) for reproduction steps","sha":"0e715b650e402c4bd7d7391e5c009ff64f896ef8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","Team:Security Generative AI","backport:version","v8.18.0"],"title":"[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues","number":207122,"url":"https://github.com/elastic/kibana/pull/207122","mergeCommit":{"message":"[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues (#207122)\n\n### [Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues\r\n\r\nThis PR fixes the following Security Assistant accessibility (a11y) issues:\r\n\r\n- <#206348> - _The ai assistant settings and actions button is announced wrong_\r\n- <#206362> - _Close button on View in AI assistant is missing discernible text_\r\n- <#206875> - _Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled_\r\n\r\n### Details\r\n\r\n#### [206348](#206348) - The ai assistant settings and actions button is announced wrong\r\n\r\nThis issue was resolved by adding an `aria-label` to the assistant settings context menu.\r\n\r\nThis fix was desk tested using Voiceover, as illustrated by the following screenshots:\r\n\r\n**Before:**\r\n\r\n![voiceover_before_206348](https://github.com/user-attachments/assets/92106bd9-b651-447e-b5dd-f59323288534)\r\n\r\n**After:**\r\n\r\n![voiceover_after_206348](https://github.com/user-attachments/assets/da580121-fab1-47e8-ae7b-41fd6d0008ca)\r\n\r\nDesk testing: see [206348](#206348) for reproduction steps\r\n\r\n#### [206362](#206362) - Close button on View in AI assistant is missing discernible text\r\n\r\nThis issue was resolved by adding an `aria-label` to the assistant close button.\r\n\r\nThis fix was desk tested using Axe, as illustrated by the following screenshots:\r\n\r\n**Before:**\r\n\r\n![axe_before_206362](https://github.com/user-attachments/assets/21503311-a9e0-402f-9ee0-333ad6d6171a)\r\n\r\n**After:**\r\n\r\n![axe_after_206362](https://github.com/user-attachments/assets/54565a48-4285-47f2-b3fd-3709feb9b57c)\r\n\r\nDesk testing: see [206362](#206362) for reproduction steps\r\n\r\n#### [206875](#206875) - Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled\r\n\r\nIssue [206875](#206875) includes the following statement:\r\n\r\n> Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets disabled. All it says right now \"show anonymized\"\r\n\r\nThe first part of the statement above:\r\n\r\n> Anonymization button doesn't get announced\r\n\r\nappears to be in reference to when the Anonymization toggle button is disabled. This is unfortunately expected, because screen readers do NOT announce disabled buttons, as described in articles like <https://css-tricks.com/making-disabled-buttons-more-inclusive/>\r\n\r\nThe second part of the statement above:\r\n\r\n> doesn't have enough context in the tooltip about when it gets enabled\r\n\r\nis addressed by this PR, though there is still a quirk described in detail below.\r\n\r\nIn this PR, when a conversation does NOT have replacements, a new (different) tooltip is displayed, as illustrated by the before / after screenshots below:\r\n\r\n**Before:**\r\n\r\n![empty_before_206875](https://github.com/user-attachments/assets/682f6269-d3db-40ee-877e-e877e9b1ae31)\r\n\r\n_Above: Before the fix, the tooltip for the disabled button reads:_ `Show anonymized`\r\n\r\n**After:**\r\n\r\n![empty_after_206875](https://github.com/user-attachments/assets/1eed6a88-c3d2-424a-abc0-ef45b9ee41d5)\r\n\r\n_Above: After the fix, the tooltip for the disabled button reads:_ `This conversation does not include anonymized fields`\r\n\r\nNote that there is still a quirk with the button, which is not addressed by this fix:\r\n\r\nThe current implementation enables the `Show anonymized` button when the conversation has _any_ replacements, regardless of whether or not the replacements are applicable to the rendered conversation. As a result, when replacements are present, but not applicable to the rendered conversation, the user may toggle the enabled button, but will not observe any changes to the rendered conversation.\r\n\r\nAlternatively, the replacements could be applied to the conversation before rendering to facilitate a comparison: If the original conversation and applied conversation are identical, the anonymization button should be disabled. If they are the different, the button should be enabled. This alternative was NOT implemented in this PR.\r\n\r\nDesk testing: see [206875](#206875) for reproduction steps","sha":"0e715b650e402c4bd7d7391e5c009ff64f896ef8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207122","number":207122,"mergeCommit":{"message":"[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues (#207122)\n\n### [Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues\r\n\r\nThis PR fixes the following Security Assistant accessibility (a11y) issues:\r\n\r\n- <#206348> - _The ai assistant settings and actions button is announced wrong_\r\n- <#206362> - _Close button on View in AI assistant is missing discernible text_\r\n- <#206875> - _Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled_\r\n\r\n### Details\r\n\r\n#### [206348](#206348) - The ai assistant settings and actions button is announced wrong\r\n\r\nThis issue was resolved by adding an `aria-label` to the assistant settings context menu.\r\n\r\nThis fix was desk tested using Voiceover, as illustrated by the following screenshots:\r\n\r\n**Before:**\r\n\r\n![voiceover_before_206348](https://github.com/user-attachments/assets/92106bd9-b651-447e-b5dd-f59323288534)\r\n\r\n**After:**\r\n\r\n![voiceover_after_206348](https://github.com/user-attachments/assets/da580121-fab1-47e8-ae7b-41fd6d0008ca)\r\n\r\nDesk testing: see [206348](#206348) for reproduction steps\r\n\r\n#### [206362](#206362) - Close button on View in AI assistant is missing discernible text\r\n\r\nThis issue was resolved by adding an `aria-label` to the assistant close button.\r\n\r\nThis fix was desk tested using Axe, as illustrated by the following screenshots:\r\n\r\n**Before:**\r\n\r\n![axe_before_206362](https://github.com/user-attachments/assets/21503311-a9e0-402f-9ee0-333ad6d6171a)\r\n\r\n**After:**\r\n\r\n![axe_after_206362](https://github.com/user-attachments/assets/54565a48-4285-47f2-b3fd-3709feb9b57c)\r\n\r\nDesk testing: see [206362](#206362) for reproduction steps\r\n\r\n#### [206875](#206875) - Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled\r\n\r\nIssue [206875](#206875) includes the following statement:\r\n\r\n> Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets disabled. All it says right now \"show anonymized\"\r\n\r\nThe first part of the statement above:\r\n\r\n> Anonymization button doesn't get announced\r\n\r\nappears to be in reference to when the Anonymization toggle button is disabled. This is unfortunately expected, because screen readers do NOT announce disabled buttons, as described in articles like <https://css-tricks.com/making-disabled-buttons-more-inclusive/>\r\n\r\nThe second part of the statement above:\r\n\r\n> doesn't have enough context in the tooltip about when it gets enabled\r\n\r\nis addressed by this PR, though there is still a quirk described in detail below.\r\n\r\nIn this PR, when a conversation does NOT have replacements, a new (different) tooltip is displayed, as illustrated by the before / after screenshots below:\r\n\r\n**Before:**\r\n\r\n![empty_before_206875](https://github.com/user-attachments/assets/682f6269-d3db-40ee-877e-e877e9b1ae31)\r\n\r\n_Above: Before the fix, the tooltip for the disabled button reads:_ `Show anonymized`\r\n\r\n**After:**\r\n\r\n![empty_after_206875](https://github.com/user-attachments/assets/1eed6a88-c3d2-424a-abc0-ef45b9ee41d5)\r\n\r\n_Above: After the fix, the tooltip for the disabled button reads:_ `This conversation does not include anonymized fields`\r\n\r\nNote that there is still a quirk with the button, which is not addressed by this fix:\r\n\r\nThe current implementation enables the `Show anonymized` button when the conversation has _any_ replacements, regardless of whether or not the replacements are applicable to the rendered conversation. As a result, when replacements are present, but not applicable to the rendered conversation, the user may toggle the enabled button, but will not observe any changes to the rendered conversation.\r\n\r\nAlternatively, the replacements could be applied to the conversation before rendering to facilitate a comparison: If the original conversation and applied conversation are identical, the anonymization button should be disabled. If they are the different, the button should be enabled. This alternative was NOT implemented in this PR.\r\n\r\nDesk testing: see [206875](#206875) for reproduction steps","sha":"0e715b650e402c4bd7d7391e5c009ff64f896ef8"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Andrew Macri <[email protected]>
- Loading branch information