diff --git a/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png b/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png index 21e88fe6fea..20fe11e98eb 100644 Binary files a/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png and b/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png differ diff --git a/packages/components/src/components/drawer/drawer.lite.tsx b/packages/components/src/components/drawer/drawer.lite.tsx index 272facefd52..0b3bab71b2d 100644 --- a/packages/components/src/components/drawer/drawer.lite.tsx +++ b/packages/components/src/components/drawer/drawer.lite.tsx @@ -94,17 +94,15 @@ export default function DBDrawer(props: DBDrawerProps) {
- - state.handleClose('close')}> - {props.closeButtonText ?? DEFAULT_CLOSE_BUTTON} - - + state.handleClose('close')}> + {props.closeButtonText ?? DEFAULT_CLOSE_BUTTON} +
{props.children}
diff --git a/packages/components/src/components/drawer/drawer.spec.tsx b/packages/components/src/components/drawer/drawer.spec.tsx index e9471f7851d..c46921511c1 100644 --- a/packages/components/src/components/drawer/drawer.spec.tsx +++ b/packages/components/src/components/drawer/drawer.spec.tsx @@ -41,7 +41,7 @@ const testAction = () => { test(`should open and close drawer`, async ({ mount, page }) => { let test: string = ''; const drawer: any = ( - (test = 'close')} withCloseButton={true}> + (test = 'close')}> Test ); diff --git a/packages/components/src/components/drawer/model.ts b/packages/components/src/components/drawer/model.ts index 35df8400444..c6909872d30 100644 --- a/packages/components/src/components/drawer/model.ts +++ b/packages/components/src/components/drawer/model.ts @@ -45,11 +45,6 @@ export interface DBDrawerDefaultProps { * The "end" depends on which direction you use. */ rounded?: boolean; - - /** - * The withCloseButton attribute shows/hides the default close button. - */ - withCloseButton?: boolean; } export type DBDrawerProps = DBDrawerDefaultProps & diff --git a/packages/components/src/components/header/header.lite.tsx b/packages/components/src/components/header/header.lite.tsx index 57829966e16..834f07538ad 100644 --- a/packages/components/src/components/header/header.lite.tsx +++ b/packages/components/src/components/header/header.lite.tsx @@ -73,7 +73,6 @@ export default function DBHeader(props: DBHeaderProps) { state.toggle()}> diff --git a/showcases/angular-showcase/src/app/components/drawer/drawer.component.html b/showcases/angular-showcase/src/app/components/drawer/drawer.component.html index 676a091f6bc..448611a633e 100644 --- a/showcases/angular-showcase/src/app/components/drawer/drawer.component.html +++ b/showcases/angular-showcase/src/app/components/drawer/drawer.component.html @@ -12,7 +12,6 @@ > (
= { checked: ['aktiviert'], ' of ': [' von '], clickable: ['anklickbar'], - 'has auto complete': ['mit Auto Vervollständigung'] + 'has auto complete': ['mit Auto Vervollständigung'], + unknown: ['Unbekannt'], + dialog: ['Dialogfeld'], + document: ['Dokument'] }; const cleanSpeakInstructions = (phraseLog: string[]): string[] => diff --git a/showcases/screen-reader/tests/drawer.spec.ts b/showcases/screen-reader/tests/drawer.spec.ts new file mode 100644 index 00000000000..74fcb92e4b3 --- /dev/null +++ b/showcases/screen-reader/tests/drawer.spec.ts @@ -0,0 +1,16 @@ +import { getTest, testDefault } from '../default'; + +const test = getTest(); + +test.describe('DBDrawer', () => { + testDefault({ + test, + title: 'should autofocus', + url: './#/01/drawer?page=density', + async testFn(voiceOver, nvda) { + const screenReader = voiceOver ?? nvda; + await screenReader?.act(); + await screenReader?.next(); + } + }); +}); diff --git a/showcases/shared/drawer.json b/showcases/shared/drawer.json index 5c300abd6c4..76e6e51fb9a 100644 --- a/showcases/shared/drawer.json +++ b/showcases/shared/drawer.json @@ -6,7 +6,6 @@ "name": "Functional", "className": "db-density-functional", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -15,7 +14,6 @@ "name": "(Default) Regular", "className": "db-density-regular", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -24,7 +22,6 @@ "name": "Expressive", "className": "db-density-expressive", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -37,7 +34,6 @@ { "name": "(Default) Medium", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -45,7 +41,6 @@ { "name": "Full", "props": { - "withCloseButton": true, "width": "full", "open": "open", "onClose": "toggleDrawer(false)" @@ -59,7 +54,6 @@ { "name": "(Default) No rounding", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -67,7 +61,6 @@ { "name": "Rounded", "props": { - "withCloseButton": true, "rounded": true, "open": "open", "onClose": "toggleDrawer(false)" @@ -81,7 +74,6 @@ { "name": "(Default) Medium", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -89,7 +81,6 @@ { "name": "Small", "props": { - "withCloseButton": true, "spacing": "small", "open": "open", "onClose": "toggleDrawer(false)" @@ -98,7 +89,6 @@ { "name": "Large", "props": { - "withCloseButton": true, "spacing": "large", "open": "open", "onClose": "toggleDrawer(false)" @@ -107,7 +97,6 @@ { "name": "No spacing", "props": { - "withCloseButton": true, "spacing": "none", "open": "open", "onClose": "toggleDrawer(false)" @@ -121,7 +110,6 @@ { "name": "(Default) With Backdrop", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -129,7 +117,6 @@ { "name": "Backdrop-weak", "props": { - "withCloseButton": true, "backdrop": "weak", "open": "open", "onClose": "toggleDrawer(false)" @@ -138,7 +125,6 @@ { "name": "Invisible", "props": { - "withCloseButton": true, "backdrop": "invisible", "open": "open", "onClose": "toggleDrawer(false)" @@ -147,7 +133,6 @@ { "name": "No Backdrop", "props": { - "withCloseButton": true, "backdrop": "none", "open": "open", "onClose": "toggleDrawer(false)" @@ -161,7 +146,6 @@ { "name": "(Default) Right", "props": { - "withCloseButton": true, "open": "open", "onClose": "toggleDrawer(false)" } @@ -169,7 +153,6 @@ { "name": "Left", "props": { - "withCloseButton": true, "direction": "left", "open": "open", "onClose": "toggleDrawer(false)" @@ -178,7 +161,6 @@ { "name": "Up", "props": { - "withCloseButton": true, "direction": "up", "open": "open", "onClose": "toggleDrawer(false)" @@ -187,7 +169,6 @@ { "name": "Down", "props": { - "withCloseButton": true, "direction": "down", "open": "open", "onClose": "toggleDrawer(false)" diff --git a/showcases/vue-showcase/src/components/drawer/Drawer.vue b/showcases/vue-showcase/src/components/drawer/Drawer.vue index 7a32ed175d2..c6ea9dcf7c9 100644 --- a/showcases/vue-showcase/src/components/drawer/Drawer.vue +++ b/showcases/vue-showcase/src/components/drawer/Drawer.vue @@ -18,7 +18,6 @@ const toggleDrawer = (example?: string) => { >