From 77897787183dba721a85d2b3ba0929b0c659c7b4 Mon Sep 17 00:00:00 2001 From: Anders Date: Mon, 9 Jan 2023 13:02:49 +0100 Subject: [PATCH] feat(Helpers): deprecate .dnb-sr-only--inline & .dnb-not-sr-only (#1865) --- .../src/docs/uilib/helpers/Examples.js | 17 ---------- .../src/docs/uilib/helpers/classes.md | 21 ------------ .../uilib/helpers/classes/visual-tests.js | 2 -- .../HelperClasses.screenshot.test.js | 8 ----- ...have-to-match-not-sr-only-1-a1ff0.snap.png | Bin 6649 -> 0 bytes .../core/helper-classes/helper-classes.scss | 8 ----- .../dnb-eufemia/src/style/core/utilities.scss | 31 ------------------ 7 files changed, 87 deletions(-) delete mode 100644 packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-not-sr-only-1-a1ff0.snap.png diff --git a/packages/dnb-design-system-portal/src/docs/uilib/helpers/Examples.js b/packages/dnb-design-system-portal/src/docs/uilib/helpers/Examples.js index fb5c48d8c6f..103477f181c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/helpers/Examples.js +++ b/packages/dnb-design-system-portal/src/docs/uilib/helpers/Examples.js @@ -93,23 +93,6 @@ export function ScreenReaderOnlyExample() { ) } -export function NoScreenReaderExample() { - return ( - - - { - /* jsx */ ` -

- I'm the opposite of .dnb-sr-only, so you should be able to see - me. -

- ` - } -
-
- ) -} - export function SelectionExample() { return ( diff --git a/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes.md b/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes.md index 8458804dd48..58cfc96fcce 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes.md +++ b/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes.md @@ -7,7 +7,6 @@ CoreStyleExample, TabFocusExample, UnstyledListExample, ScreenReaderOnlyExample, -NoScreenReaderExample, SelectionExample } from 'Docs/uilib/helpers/Examples' import SkipLinkExample from 'Docs/uilib/usage/accessibility/examples/skip-link-example.js' @@ -105,24 +104,6 @@ Visually hides an element, but is still reachable by screen readers. (_sr_ stand -### Screen Reader only: inline - -`dnb-sr-only--inline` (deprecated in v10) - -Like `dnb-sr-only` - but with flow elements in mind. This enables a set of text (in a paragraph `

`) to be enhanced with spans inside without NVDA to split up reading the text. - -### Not Screen Reader only - -`dnb-not-sr-only` (deprecated in v10) - -The opposite of `dnb-sr-only`, so not visible to screen readers. - -```html -

text sr-only text

-``` - - - ## Drop shadow `dnb-drop-shadow` @@ -212,8 +193,6 @@ You can import Eufemia _mixins_ directly into your SCSS styles: /** Screen Reader Only */ @include srOnly() { } // .dnb-sr-only -@include srOnlyInline() { -} // .dnb-sr-only--inline /** Browser Checks */ @include IS_EDGE { diff --git a/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes/visual-tests.js b/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes/visual-tests.js index 11a7f2ab3b1..d211c8be483 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes/visual-tests.js +++ b/packages/dnb-design-system-portal/src/docs/uilib/helpers/classes/visual-tests.js @@ -4,7 +4,6 @@ import { TabFocusExample, UnstyledListExample, ScreenReaderOnlyExample, - NoScreenReaderExample, SelectionExample, } from '../Examples' import { warn } from '@dnb/eufemia/src/shared/component-helper' @@ -36,7 +35,6 @@ export default function VisualTests() { - ) diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js index 84d93fb640f..4a9ff981643 100644 --- a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js +++ b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js @@ -45,14 +45,6 @@ describe('HelperClasses screenshot', () => { expect(screenshot).toMatchImageSnapshot() }) - it('have to match not-sr-only', async () => { - const screenshot = await testPageScreenshot({ - addWrapper: false, - selector: '[data-visual-test="helper-not-sr-only"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match selection', async () => { const screenshot = await testPageScreenshot({ addWrapper: false, diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-not-sr-only-1-a1ff0.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-not-sr-only-1-a1ff0.snap.png deleted file mode 100644 index 2868be36fad20c2b9d23c3b97c4afd458267dd8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6649 zcmY+Jby$_%(#AJRm!NdFAV^9hol2{KAkreSsh93XVvBSrA}uK(sdOq}fYQ<+-QC~p zbKdjE_gq}WX7fC2t(m#!cMp-;nkq#2H24Svf=EqOQ5S)@5(wW@;9|pPZRG8T@CD-^ zT@`sm*>}2S1cLgbnxfo8&o}ECHUhPp3he|6ELlu-n@buroRDY5R59y%+SYGWcX zJuu0BGu+|rS7{X{#%Ercrl5c5%0k1c(~8w0aO?H;xIE#S1I|!CmCwuGGFt~kwUj6B zIj#MtJ`B>X6NZ`@MH02|B_0h2lE}BT{(Eirn~was;`G1ktlsH{Eb)J@m$8HnSHAr3 zeQ{>Eh-(Z|vZ|`MPa8btWW)k4qz*PFP7ClKXln<)dPS0(n|oHcaPdLs>C=}-N1hG- z=b!48Fc4oX1^+a7-B=y|&^=adw=MGL-r?G4NHitiO5)!?_5a`!5ZJklZVIu);W9Hb zAFbC;r5hz)3;tUvK3rz301sPPS*hx347ik*mzUQzG%PweJ{{O}iVXAaiKH%q1;73-NDZcN0K@9emAbaXiJiQcA@@u#yJ zE>rULm7-5hObo66XK{AN2R->=cA#)bN1H26zPg;3 zm$*F=xr|=1rL}cVP0fK;%Hqmk@zTU+QDQo=t%8(qt*zV639ybgZ{GZ+2nm@BAVx_C zc6N3y{Vx2K$wh#3pNEI1++pI=VZL97x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(25h^`pw z5Ex5Z^k*y8InQC&I82N!g)KqBC~0exm|Iu?p_jX@>Wz$yn4TW2qk2jR$G3mxs9Za7 z=z|f5*<2S2#}`0sV9k64&JcEMPA5q>E}C zWxoJ31UVZUE@B2LT-g9gtly`G;MQ1SrUdb;`)83D;eMb;Eg}+FTB1>y&{Tf=V_h8; zOek-a;nOive{;V$x-10Ltd~~OkBW}ozo)OO+a{*_LDpHg1M-o|c`&OETbYOAhWyHh zrk}2jvI<~R6-=(>;H9Z|-Qu&t$H%AAx4omtX#91-1+_mM)>X#zzNm=hgGsZ43pG(; zX(>AlXT0-3X~y2afA7hyFF;04Ubr^_xDiLns{ATA_=<8}N($xUa#M_A-_fd%`Od$n z(k&l^qx@}cZB@Oz>NOW`$g4hnoYv)>MPT2pU}k2Pv+&hY5OsXVs-a^2P`5BKF*$i9 z(E}#PIhsHuG`#~HXuT^eD$+ewXOv`5x+k1(Vd0o$W_NX@r)blsi0h6XhX*^M%16d4 z{d?pX#y^K6ie~l^j@)HgSI;kHhI`kGHjd+xjQ z^`>ESL-xzs!MFC^AvKPLwA9o#eFa=|C}i{EwrACS45P%_aaubZq|2Q%i5S6?5iW+< z0s(qjpJGBIaDPL!GpohisHDPTX)$T3bU*aJD6(Yw`}^y>_iq8k{RDzOIyouoFxzF1 z^uVAU6+>U?I9KKO8cH^==EHX}t>k>nuBWEp(Fl!(FmxEAK(o`&yHx2$j9{uR? diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/helper-classes.scss b/packages/dnb-eufemia/src/style/core/helper-classes/helper-classes.scss index abeae44157e..0f26b606b11 100644 --- a/packages/dnb-eufemia/src/style/core/helper-classes/helper-classes.scss +++ b/packages/dnb-eufemia/src/style/core/helper-classes/helper-classes.scss @@ -38,14 +38,6 @@ @include srOnly(); } -// deprecated and can be removed in v10 -.dnb-sr-only--inline { - @include srOnlyInline(); -} -// deprecated and can be removed in v10 -.dnb-not-sr-only { - @include notSrOnly(); -} .dnb-suffix { padding-left: 0.5rem; diff --git a/packages/dnb-eufemia/src/style/core/utilities.scss b/packages/dnb-eufemia/src/style/core/utilities.scss index bb8192fba00..a1bf977adc4 100644 --- a/packages/dnb-eufemia/src/style/core/utilities.scss +++ b/packages/dnb-eufemia/src/style/core/utilities.scss @@ -319,37 +319,6 @@ $breakpoints: ( border: 0; } -// deprecated and can be removed in v10 -// Visual test and docs should be removed as well! -@mixin srOnlyInline() { - @include srOnly(); - - // since we do use it also as positioning helper - // we then do not want it absolute positioned - position: static; - display: inline-block; - - visibility: visible; // should not be hidden! - - font-size: 0; - line-height: 0; -} - -// deprecated and can be removed in v10 -// Visual test and docs should be removed as well! -@mixin notSrOnly() { - position: initial; - max-width: initial; - max-height: initial; - - clip-path: initial; - overflow: auto; - - font-size: initial; - line-height: initial; - white-space: initial; -} - @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search);