Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues #207122

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

andrew-goldstein
Copy link
Contributor

@andrew-goldstein andrew-goldstein commented Jan 17, 2025

[Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues

This PR fixes the following Security Assistant accessibility (a11y) issues:

Details

206348 - The ai assistant settings and actions button is announced wrong

This issue was resolved by adding an aria-label to the assistant settings context menu.

This fix was desk tested using Voiceover, as illustrated by the following screenshots:

Before:

voiceover_before_206348

After:

voiceover_after_206348

Desk testing: see 206348 for reproduction steps

206362 - Close button on View in AI assistant is missing discernible text

This issue was resolved by adding an aria-label to the assistant close button.

This fix was desk tested using Axe, as illustrated by the following screenshots:

Before:

axe_before_206362

After:

axe_after_206362

Desk testing: see 206362 for reproduction steps

206875 - Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled

Issue 206875 includes the following statement:

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"

The first part of the statement above:

Anonymization button doesn't get announced

appears 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/

The second part of the statement above:

doesn't have enough context in the tooltip about when it gets enabled

is addressed by this PR, though there is still a quirk described in detail below.

In this PR, when a conversation does NOT have replacements, a new (different) tooltip is displayed, as illustrated by the before / after screenshots below:

Before:

empty_before_206875

Above: Before the fix, the tooltip for the disabled button reads: Show anonymized

After:

empty_after_206875

Above: After the fix, the tooltip for the disabled button reads: This conversation does not include anonymized fields

Note that there is still a quirk with the button, which is not addressed by this fix:

The 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.

Alternatively, 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.

Desk testing: see 206875 for reproduction steps

… accessibility (a11y) issues

This PR fixes the following Security Assistant accessibility (a11y) issues:

- <elastic#206348> - _The ai assistant settings and actions button is announced wrong_
- <elastic#206362> - _Close button on View in AI assistant is missing discernible text_
- <elastic#206875> - _Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled_

### Details

#### [206348](elastic#206348) - The ai assistant settings and actions button is announced wrong

This issue was resolved by adding an `aria-label` to the assistant settings context menu.

This fix was desk tested using Voiceover, as illustrated by the following screenshots:

**Before:**

![voiceover_before_206348](https://github.com/user-attachments/assets/92106bd9-b651-447e-b5dd-f59323288534)

**After:**

![voiceover_after_206348](https://github.com/user-attachments/assets/da580121-fab1-47e8-ae7b-41fd6d0008ca)

Desk testing: see [206348](elastic#206348) for reproduction steps

#### [206362](elastic#206362) - Close button on View in AI assistant is missing discernible text

This issue was resolved by adding an `aria-label` to the assistant close button.

This fix was desk tested using Axe, as illustrated by the following screenshots:

**Before:**

![axe_before_206362](https://github.com/user-attachments/assets/21503311-a9e0-402f-9ee0-333ad6d6171a)

**After:**

![axe_after_206362](https://github.com/user-attachments/assets/54565a48-4285-47f2-b3fd-3709feb9b57c)

Desk testing: see [206362](elastic#206362) for reproduction steps

#### [206875](elastic#206875) - Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled

Issue [206875](elastic#206875) includes the following statement:

> 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"

The first part of the statement above:

> Anonymization button doesn't get announced

appears 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/>

The second part of the statement above:

> doesn't have enough context in the tooltip about when it gets enabled

is addressed by this PR, though there is still a quirk described in detail below.

In this PR, when a conversation does NOT have replacements, a new (different) tooltip is displayed, as illustrated by the before / after screenshots below:

**Before:**

![empty_before_206875](https://github.com/user-attachments/assets/682f6269-d3db-40ee-877e-e877e9b1ae31)

_Above: Before the fix, the tooltip for the disabled button reads:_ `Show anonymized`

**After:**

![empty_after_206875](https://github.com/user-attachments/assets/1eed6a88-c3d2-424a-abc0-ef45b9ee41d5)

_Above: After the fix, the tooltip for the disabled button reads:_ `This conversation does not include anonymized fields`

Note that there is still a quirk with the button, which is not addressed by this fix:

The 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.

Alternatively, 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.

Desk testing: see [206875](elastic#206875) for reproduction steps
@andrew-goldstein andrew-goldstein added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v8.18.0 labels Jan 17, 2025
@andrew-goldstein andrew-goldstein self-assigned this Jan 17, 2025
@andrew-goldstein andrew-goldstein requested a review from a team as a code owner January 17, 2025 18:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@stephmilovic
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the improvements for our users, and for adding tests!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
integrationAssistant 740 742 +2
securitySolution 6607 6609 +2
total +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 21.3MB 21.3MB +1.1KB

History

cc @andrew-goldstein

@andrew-goldstein andrew-goldstein merged commit 0e715b6 into elastic:main Jan 22, 2025
8 checks passed
@andrew-goldstein andrew-goldstein deleted the assistant_a11y_fixes branch January 22, 2025 18:06
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12914339002

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 22, 2025
…essibility (a11y) issues (elastic#207122)

### [Security Solution] [Security Assistant] Fixes Security Assistant accessibility (a11y) issues

This PR fixes the following Security Assistant accessibility (a11y) issues:

- <elastic#206348> - _The ai assistant settings and actions button is announced wrong_
- <elastic#206362> - _Close button on View in AI assistant is missing discernible text_
- <elastic#206875> - _Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled_

### Details

#### [206348](elastic#206348) - The ai assistant settings and actions button is announced wrong

This issue was resolved by adding an `aria-label` to the assistant settings context menu.

This fix was desk tested using Voiceover, as illustrated by the following screenshots:

**Before:**

![voiceover_before_206348](https://github.com/user-attachments/assets/92106bd9-b651-447e-b5dd-f59323288534)

**After:**

![voiceover_after_206348](https://github.com/user-attachments/assets/da580121-fab1-47e8-ae7b-41fd6d0008ca)

Desk testing: see [206348](elastic#206348) for reproduction steps

#### [206362](elastic#206362) - Close button on View in AI assistant is missing discernible text

This issue was resolved by adding an `aria-label` to the assistant close button.

This fix was desk tested using Axe, as illustrated by the following screenshots:

**Before:**

![axe_before_206362](https://github.com/user-attachments/assets/21503311-a9e0-402f-9ee0-333ad6d6171a)

**After:**

![axe_after_206362](https://github.com/user-attachments/assets/54565a48-4285-47f2-b3fd-3709feb9b57c)

Desk testing: see [206362](elastic#206362) for reproduction steps

#### [206875](elastic#206875) - Anonymization button doesn't get announced and doesn't have enough context in the tooltip about when it gets enabled

Issue [206875](elastic#206875) includes the following statement:

> 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"

The first part of the statement above:

> Anonymization button doesn't get announced

appears 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/>

The second part of the statement above:

> doesn't have enough context in the tooltip about when it gets enabled

is addressed by this PR, though there is still a quirk described in detail below.

In this PR, when a conversation does NOT have replacements, a new (different) tooltip is displayed, as illustrated by the before / after screenshots below:

**Before:**

![empty_before_206875](https://github.com/user-attachments/assets/682f6269-d3db-40ee-877e-e877e9b1ae31)

_Above: Before the fix, the tooltip for the disabled button reads:_ `Show anonymized`

**After:**

![empty_after_206875](https://github.com/user-attachments/assets/1eed6a88-c3d2-424a-abc0-ef45b9ee41d5)

_Above: After the fix, the tooltip for the disabled button reads:_ `This conversation does not include anonymized fields`

Note that there is still a quirk with the button, which is not addressed by this fix:

The 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.

Alternatively, 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.

Desk testing: see [206875](elastic#206875) for reproduction steps

(cherry picked from commit 0e715b6)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 22, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants