mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 18:27:59 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [fix: [Stateful: Home page] Wrong announcement of code editor (#195922)](https://github.com/elastic/kibana/pull/195922) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alexey Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2024-10-15T12:30:55Z","message":"fix: [Stateful: Home page] Wrong announcement of code editor (#195922)\n\nCloses: https://github.com/elastic/kibana/issues/195289\r\nCloses: https://github.com/elastic/kibana/issues/195198\r\nCloses: https://github.com/elastic/kibana/issues/195358\r\n\r\n## Description \r\n\r\n- The text editor must be fully accessible and functional across all\r\ndevices, ensuring users can edit text using various input methods, not\r\njust a mouse. This functionality should be available in both the\r\nexpanded and collapsed states.\r\n\r\n- Appropriate aria-label attribute must be assigned to elements to\r\nprovide users with clear context and understanding of the type of\r\nelement they are interacting with. This enhances usability and\r\naccessibility for all users.\r\n\r\n## What was changed: \r\n\r\n- Updated the aria-label attribute for the editor button to improve\r\naccessibility.\r\n- Resolved an issue with the background color when activating\r\nfull-screen mode from the dialog.\r\n- Fixed keyboard navigation for full-screen mode, enabling users to\r\nactivate Edit Mode using only the keyboard.\r\n\r\n## Screen \r\n\r\n\r\nhttps://github.com/user-attachments/assets/af122fab-3ce9-4a7f-b8b1-d75d39969781","sha":"04efa04d6b8fc7ac6bc6996717453bd56200104a","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.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: [Stateful: Home page] Wrong announcement of code editor","number":195922,"url":"https://github.com/elastic/kibana/pull/195922","mergeCommit":{"message":"fix: [Stateful: Home page] Wrong announcement of code editor (#195922)\n\nCloses: https://github.com/elastic/kibana/issues/195289\r\nCloses: https://github.com/elastic/kibana/issues/195198\r\nCloses: https://github.com/elastic/kibana/issues/195358\r\n\r\n## Description \r\n\r\n- The text editor must be fully accessible and functional across all\r\ndevices, ensuring users can edit text using various input methods, not\r\njust a mouse. This functionality should be available in both the\r\nexpanded and collapsed states.\r\n\r\n- Appropriate aria-label attribute must be assigned to elements to\r\nprovide users with clear context and understanding of the type of\r\nelement they are interacting with. This enhances usability and\r\naccessibility for all users.\r\n\r\n## What was changed: \r\n\r\n- Updated the aria-label attribute for the editor button to improve\r\naccessibility.\r\n- Resolved an issue with the background color when activating\r\nfull-screen mode from the dialog.\r\n- Fixed keyboard navigation for full-screen mode, enabling users to\r\nactivate Edit Mode using only the keyboard.\r\n\r\n## Screen \r\n\r\n\r\nhttps://github.com/user-attachments/assets/af122fab-3ce9-4a7f-b8b1-d75d39969781","sha":"04efa04d6b8fc7ac6bc6996717453bd56200104a"}},"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/195922","number":195922,"mergeCommit":{"message":"fix: [Stateful: Home page] Wrong announcement of code editor (#195922)\n\nCloses: https://github.com/elastic/kibana/issues/195289\r\nCloses: https://github.com/elastic/kibana/issues/195198\r\nCloses: https://github.com/elastic/kibana/issues/195358\r\n\r\n## Description \r\n\r\n- The text editor must be fully accessible and functional across all\r\ndevices, ensuring users can edit text using various input methods, not\r\njust a mouse. This functionality should be available in both the\r\nexpanded and collapsed states.\r\n\r\n- Appropriate aria-label attribute must be assigned to elements to\r\nprovide users with clear context and understanding of the type of\r\nelement they are interacting with. This enhances usability and\r\naccessibility for all users.\r\n\r\n## What was changed: \r\n\r\n- Updated the aria-label attribute for the editor button to improve\r\naccessibility.\r\n- Resolved an issue with the background color when activating\r\nfull-screen mode from the dialog.\r\n- Fixed keyboard navigation for full-screen mode, enabling users to\r\nactivate Edit Mode using only the keyboard.\r\n\r\n## Screen \r\n\r\n\r\nhttps://github.com/user-attachments/assets/af122fab-3ce9-4a7f-b8b1-d75d39969781","sha":"04efa04d6b8fc7ac6bc6996717453bd56200104a"}}]}] BACKPORT--> Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
import { css } from '@emotion/react';
|
|
import type { EuiThemeComputed } from '@elastic/eui';
|
|
|
|
export const styles = {
|
|
container: css`
|
|
position: relative;
|
|
height: 100%;
|
|
`,
|
|
fullscreenContainer: (euiTheme: EuiThemeComputed) => css`
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
background: ${euiTheme.colors.body};
|
|
`,
|
|
keyboardHint: (euiTheme: EuiThemeComputed) => css`
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
left: 0;
|
|
&:focus {
|
|
z-index: ${euiTheme.levels.mask};
|
|
}
|
|
`,
|
|
controls: {
|
|
base: (euiTheme: EuiThemeComputed) => css`
|
|
position: absolute;
|
|
top: ${euiTheme.size.xs};
|
|
right: ${euiTheme.size.base};
|
|
z-index: ${euiTheme.levels.menu};
|
|
`,
|
|
fullscreen: (euiTheme: EuiThemeComputed) => css`
|
|
top: ${euiTheme.size.l};
|
|
right: ${euiTheme.size.l};
|
|
`,
|
|
},
|
|
};
|