Browse Source

Add attributes for the "Tabbed carousel" pattern.

NaotoshiFujita 3 years ago
parent
commit
1f10646b04
1 changed files with 2 additions and 2 deletions
  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_SLIDE_KEYDOWN, onKeydown );
     on( [ EVENT_MOUNTED, EVENT_UPDATED ], update );
     on( [ EVENT_MOUNTED, EVENT_UPDATED ], update );
 
 
-    setAttribute( list, ROLE, 'menu' );
+    setAttribute( list, ROLE, 'tablist' );
     events.push( event );
     events.push( event );
     event.emit( EVENT_NAVIGATION_MOUNTED, Splide.splides );
     event.emit( EVENT_NAVIGATION_MOUNTED, Splide.splides );
   }
   }
@@ -117,7 +117,7 @@ export function Sync( Splide: Splide, Components: Components, options: Options )
    * Update attributes.
    * Update attributes.
    */
    */
   function update(): void {
   function update(): void {
-    setAttribute( list, ARIA_ORIENTATION, options.direction !== TTB ? 'horizontal' : null );
+    setAttribute( list, ARIA_ORIENTATION, options.direction === TTB ? 'vertical' : null );
   }
   }
 
 
   /**
   /**