diff --git a/e2e/visual/no-theme.spec.js b/e2e/visual/no-theme.spec.js index 16f4ac55e..b22b2ca20 100644 --- a/e2e/visual/no-theme.spec.js +++ b/e2e/visual/no-theme.spec.js @@ -77,13 +77,8 @@ test('no-theme - editor', async ({ page, makeAxeBuilder }) => { await expect(page).toHaveScreenshot(); // and then - // @Note(pinussilvestrus): the palette entries are currently - // not keyboard accessible, as we need to invest in an overall - // editor keyboard experience - // cf. https://github.com/bpmn-io/form-js/issues/536 const results = await makeAxeBuilder({ disableRules: [ - 'scrollable-region-focusable', 'page-has-heading-one' ] }).analyze(); diff --git a/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-chromium-linux.png b/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-chromium-linux.png index c1c03518f..b8702cbb6 100644 Binary files a/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-chromium-linux.png and b/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-chromium-linux.png differ diff --git a/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-firefox-linux.png b/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-firefox-linux.png index 77eecee29..940996216 100644 Binary files a/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-firefox-linux.png and b/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-firefox-linux.png differ diff --git a/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-webkit-linux.png b/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-webkit-linux.png index f68b66b4c..6e7d8a23c 100644 Binary files a/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-webkit-linux.png and b/e2e/visual/no-theme.spec.js-snapshots/no-theme---editor-1-webkit-linux.png differ diff --git a/e2e/visual/theming.spec.js b/e2e/visual/theming.spec.js index 69dcd20b5..20b5158c1 100644 --- a/e2e/visual/theming.spec.js +++ b/e2e/visual/theming.spec.js @@ -77,13 +77,8 @@ test('theming - editor', async ({ page, makeAxeBuilder }) => { await expect(page).toHaveScreenshot(); // and then - // @Note(pinussilvestrus): the palette entries are currently - // not keyboard accessible, as we need to invest in an overall - // editor keyboard experience - // cf. https://github.com/bpmn-io/form-js/issues/536 const results = await makeAxeBuilder({ disableRules: [ - 'scrollable-region-focusable', 'page-has-heading-one' ] }).analyze(); diff --git a/e2e/visual/theming.spec.js-snapshots/theming---editor-1-chromium-linux.png b/e2e/visual/theming.spec.js-snapshots/theming---editor-1-chromium-linux.png index 9b2c813a1..e175ef992 100644 Binary files a/e2e/visual/theming.spec.js-snapshots/theming---editor-1-chromium-linux.png and b/e2e/visual/theming.spec.js-snapshots/theming---editor-1-chromium-linux.png differ diff --git a/e2e/visual/theming.spec.js-snapshots/theming---editor-1-firefox-linux.png b/e2e/visual/theming.spec.js-snapshots/theming---editor-1-firefox-linux.png index ccb0cee6f..308f09bbc 100644 Binary files a/e2e/visual/theming.spec.js-snapshots/theming---editor-1-firefox-linux.png and b/e2e/visual/theming.spec.js-snapshots/theming---editor-1-firefox-linux.png differ diff --git a/e2e/visual/theming.spec.js-snapshots/theming---editor-1-webkit-linux.png b/e2e/visual/theming.spec.js-snapshots/theming---editor-1-webkit-linux.png index a97185b7f..956f707c1 100644 Binary files a/e2e/visual/theming.spec.js-snapshots/theming---editor-1-webkit-linux.png and b/e2e/visual/theming.spec.js-snapshots/theming---editor-1-webkit-linux.png differ diff --git a/packages/form-js-editor/assets/form-js-editor-base.css b/packages/form-js-editor/assets/form-js-editor-base.css index 6962e9cb2..45ec835a1 100644 --- a/packages/form-js-editor/assets/form-js-editor-base.css +++ b/packages/form-js-editor/assets/form-js-editor-base.css @@ -61,6 +61,7 @@ --cds-border-strong, var(--cds-border-strong-01, var(--color-grey-225-10-80)) ); + --color-palette-field-focus: var(--cds-border-interactive, var(--color-blue-205-100-45)); --color-palette-field-hover-background: var(--cds-background-hover, var(--color-grey-225-10-90)); --cursor-palette-field: grab; --palette-width: 250px; @@ -625,6 +626,9 @@ flex-direction: column; justify-content: center; font-size: 11px; + align-items: center; + border: none; + font-family: inherit; user-select: none; color: var( --color-palette-field); background: var(--color-palette-field-background); @@ -634,12 +638,18 @@ width: 68px; } +.fjs-palette-container .fjs-palette-field:focus { + outline: none; + border: solid 1px var(--color-palette-field-focus); +} + .fjs-palette-field .fjs-palette-field-icon { margin: 0 auto; } .fjs-palette-field .fjs-palette-field-text { text-align: center; + width: inherit; } .fjs-palette-container .fjs-palette-field:hover { diff --git a/packages/form-js-editor/src/features/palette/components/Palette.js b/packages/form-js-editor/src/features/palette/components/Palette.js index a10dd6afb..e13102a84 100644 --- a/packages/form-js-editor/src/features/palette/components/Palette.js +++ b/packages/form-js-editor/src/features/palette/components/Palette.js @@ -11,10 +11,11 @@ import { import { CloseIcon, - iconsByType, SearchIcon } from '../../../render/components/icons'; +import PaletteEntry from './PaletteEntry'; + import { formFields } from '@bpmn-io/form-js-viewer'; export const PALETTE_ENTRIES = formFields.filter(({ config: fieldConfig }) => fieldConfig.type !== 'default').map(({ config: fieldConfig }) => { @@ -120,20 +121,11 @@ export default function Palette(props) { { label }