Jelajahi Sumber

Add attributes for the "Tabbed carousel" pattern.

NaotoshiFujita 3 tahun lalu
induk
melakukan
1f10646b04
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/js/components/Sync/Sync.ts

+ 2 - 2
src/js/components/Sync/Sync.ts

@@ -108,7 +108,7 @@ export function Sync( Splide: Splide, Components: Components, options: Options )
     on( EVENT_SLIDE_KEYDOWN, onKeydown );
     on( [ EVENT_MOUNTED, EVENT_UPDATED ], update );
 
-    setAttribute( list, ROLE, 'menu' );
+    setAttribute( list, ROLE, 'tablist' );
     events.push( event );
     event.emit( EVENT_NAVIGATION_MOUNTED, Splide.splides );
   }
@@ -117,7 +117,7 @@ export function Sync( Splide: Splide, Components: Components, options: Options )
    * Update attributes.
    */
   function update(): void {
-    setAttribute( list, ARIA_ORIENTATION, options.direction !== TTB ? 'horizontal' : null );
+    setAttribute( list, ARIA_ORIENTATION, options.direction === TTB ? 'vertical' : null );
   }
 
   /**