File tree Expand file tree Collapse file tree 5 files changed +28
-7
lines changed
Expand file tree Collapse file tree 5 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,9 @@ export const drag = (
2525 // TouchEvent is not available in Firefox
2626 if ( 'TouchEvent' in window && event instanceof TouchEvent ) {
2727 pointerEvent = event . touches [ 0 ] ;
28- } else if ( event instanceof PointerEvent ) {
28+ } else if ( event instanceof PointerEvent ) {
2929 pointerEvent = event ;
30- }
31- else {
30+ } else {
3231 return ;
3332 }
3433
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ export class UUIIconElement extends LitElement {
149149 : host svg ,
150150 ::slotted (svg ) {
151151 color : var (--uui-icon-color , currentColor);
152+ width : 100% ;
152153 }
153154
154155 : host-context (div[slot = 'prepend' ]) {
Original file line number Diff line number Diff line change @@ -224,5 +224,13 @@ describe('UUIIconElement', () => {
224224 it ( 'Child uui-icon passes the a11y audit' , async ( ) => {
225225 await expect ( testElement . iconElement ) . shadowDom . to . be . accessible ( ) ;
226226 } ) ;
227+
228+ it ( 'svg has a size of 18px for both width and height' , ( ) => {
229+ const svgElement =
230+ testElement . iconElement . shadowRoot ! . querySelector ( 'svg' ) ! ;
231+ const computedStyle = getComputedStyle ( svgElement ) ;
232+ expect ( computedStyle . width ) . to . equal ( '18px' ) ;
233+ expect ( computedStyle . height ) . to . equal ( '18px' ) ;
234+ } ) ;
227235 } ) ;
228236} ) ;
Original file line number Diff line number Diff line change @@ -77,8 +77,6 @@ export class UUITabGroupElement extends LitElement {
7777 demandCustomElement ( this , 'uui-popover-container' ) ;
7878 demandCustomElement ( this , 'uui-symbol-more' ) ;
7979
80- if ( ! this . hasAttribute ( 'role' ) ) this . setAttribute ( 'role' , 'tablist' ) ;
81-
8280 await this . updateComplete ;
8381 this . #resizeObserver. observe ( this . _mainElement ) ;
8482 }
@@ -268,7 +266,7 @@ export class UUITabGroupElement extends LitElement {
268266 render ( ) {
269267 return html `
270268 <div id= "main" >
271- <div id= "grid" >
269+ <div id= "grid" role = "tablist" >
272270 <slot @slotchange = ${ this . #onSlotChange} > </ slot>
273271 </ div>
274272 <uui- butto n
@@ -284,7 +282,7 @@ export class UUITabGroupElement extends LitElement {
284282 id= "popover-container"
285283 popover
286284 placement = "bottom-end" >
287- <div id= "hidden-tabs-container" >
285+ <div id= "hidden-tabs-container" role = "tablist" >
288286 ${ repeat ( this . #hiddenTabElements, el => html `${ el } ` ) }
289287 </ div>
290288 </ uui- popover- container>
Original file line number Diff line number Diff line change @@ -17,6 +17,21 @@ describe('UuiTab', () => {
1717 < uui-tab label ="Content "> Content</ uui-tab >
1818 < uui-tab label ="Packages "> Packages</ uui-tab >
1919 < uui-tab label ="Media " active > Media</ uui-tab >
20+ < uui-tab label ="Content1 "> Content to force a more button</ uui-tab >
21+ < uui-tab label ="Content2 "> Content to force a more button</ uui-tab >
22+ < uui-tab label ="Content3 "> Content to force a more button</ uui-tab >
23+ < uui-tab label ="Content4 "> Content to force a more button</ uui-tab >
24+ < uui-tab label ="Content5 "> Content to force a more button</ uui-tab >
25+ < uui-tab label ="Content6 "> Content to force a more button</ uui-tab >
26+ < uui-tab label ="Content7 "> Content to force a more button</ uui-tab >
27+ < uui-tab label ="Content8 "> Content to force a more button</ uui-tab >
28+ < uui-tab label ="Content9 "> Content to force a more button</ uui-tab >
29+ < uui-tab label ="Content10 "> Content to force a more button</ uui-tab >
30+ < uui-tab label ="Content11 "> Content to force a more button</ uui-tab >
31+ < uui-tab label ="Content12 "> Content to force a more button</ uui-tab >
32+ < uui-tab label ="Content13 "> Content to force a more button</ uui-tab >
33+ < uui-tab label ="Content14 "> Content to force a more button</ uui-tab >
34+ < uui-tab label ="Content15 "> Content to force a more button</ uui-tab >
2035 </ uui-tab-group >
2136 ` ) ;
2237
You can’t perform that action at this time.
0 commit comments