Title: [246112] trunk/Websites/webkit.org
Revision
246112
Author
j...@apple.com
Date
2019-06-05 10:03:27 -0700 (Wed, 05 Jun 2019)

Log Message

Improve accessibility on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=198531

Reviewed by Devin Rousso.

* wp-content/themes/webkit/functions.php: Added menuitem ARIA role to links
* wp-content/themes/webkit/widgets/post.php: Added aria-label to SVG icons

Modified Paths

Diff

Modified: trunk/Websites/webkit.org/ChangeLog (246111 => 246112)


--- trunk/Websites/webkit.org/ChangeLog	2019-06-05 17:02:04 UTC (rev 246111)
+++ trunk/Websites/webkit.org/ChangeLog	2019-06-05 17:03:27 UTC (rev 246112)
@@ -1,3 +1,13 @@
+2019-06-05  Jon Davis  <j...@apple.com>
+
+        Improve accessibility on webkit.org
+        https://bugs.webkit.org/show_bug.cgi?id=198531
+
+        Reviewed by Devin Rousso.
+
+        * wp-content/themes/webkit/functions.php: Added menuitem ARIA role to links
+        * wp-content/themes/webkit/widgets/post.php: Added aria-label to SVG icons
+
 2019-06-04  Jon Davis  <j...@apple.com>
 
         Improve performance of the lazy image loader

Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php (246111 => 246112)


--- trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php	2019-06-05 17:02:04 UTC (rev 246111)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php	2019-06-05 17:03:27 UTC (rev 246112)
@@ -435,7 +435,7 @@
         $atts['target'] = ! empty( $item->target )     ? $item->target     : '';
         $atts['rel']    = ! empty( $item->xfn )        ? $item->xfn        : '';
         $atts['href']   = ! empty( $item->url )        ? $item->url        : '';
-        $atts['role']   = ! empty( $item->role )       ? $item->role       : '';
+        $atts['role']   = ! empty( $item->role )       ? $item->role       : 'menuitem';
 
         if ( in_array('menu-item-has-children', $item->classes) && 0 == $depth ) {
             $atts['aria-haspopup'] = "true";

Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/widgets/post.php (246111 => 246112)


--- trunk/Websites/webkit.org/wp-content/themes/webkit/widgets/post.php	2019-06-05 17:02:04 UTC (rev 246111)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/widgets/post.php	2019-06-05 17:03:27 UTC (rev 246112)
@@ -68,7 +68,7 @@
                 <a class="tile-link" href="" the_permalink(); ?>"><?php echo $title; ?></a>
                 <div class="background-image">
                     <svg viewbox="0 0 100 100">
-                        <use xlink:href="" echo esc_attr(get_post_icon()); ?>" />
+                        <use xlink:href="" echo esc_attr(get_post_icon()); ?>" aria-label="<?php echo esc_attr(str_replace('-',' ', get_post_icon())); ?> icon" />
                     </svg>
                     <div class="featured-image"<?php echo $image; ?>></div>
                     <?php if ( $featured ): ?><div class="background-vignette"></div><?php endif; ?>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to