File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
packages/unity-bootstrap-theme/src/js Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -42,22 +42,8 @@ function initCardBodies() {
4242 }
4343 visibleText = tempText + '...' ;
4444
45- // Create a new hidden element to store the truncated text
46- const visibleTextElementId = `visible-text-${ Math . random ( ) . toString ( 36 ) . substring ( 7 ) } ` ;
47- const visibleTextElement = document . createElement ( 'div' ) ;
48- visibleTextElement . id = visibleTextElementId ;
49- visibleTextElement . textContent = visibleText ;
50- visibleTextElement . style . position = 'absolute' ;
51- visibleTextElement . style . top = '0' ;
52- visibleTextElement . style . zIndex = '-1' ;
45+ paragraph . setAttribute ( 'aria-label' , visibleText ) ;
5346
54- // Add the hidden element to the DOM
55- cardBody . appendChild ( visibleTextElement ) ;
56-
57- paragraph . setAttribute ( 'aria-describedby' , visibleTextElementId ) ;
58-
59- // Hide the original paragraph from screen readers
60- paragraph . setAttribute ( 'aria-hidden' , 'true' ) ;
6147 }
6248 } ) ;
6349
You can’t perform that action at this time.
0 commit comments