Changeset 246112 in webkit


Ignore:
Timestamp:
Jun 5, 2019 10:03:27 AM (5 years ago)
Author:
Jon Davis
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
Location:
trunk/Websites/webkit.org
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/webkit.org/ChangeLog

    r246094 r246112  
     12019-06-05  Jon Davis  <jond@apple.com>
     2
     3        Improve accessibility on webkit.org
     4        https://bugs.webkit.org/show_bug.cgi?id=198531
     5
     6        Reviewed by Devin Rousso.
     7
     8        * wp-content/themes/webkit/functions.php: Added menuitem ARIA role to links
     9        * wp-content/themes/webkit/widgets/post.php: Added aria-label to SVG icons
     10
    1112019-06-04  Jon Davis  <jond@apple.com>
    212
  • trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php

    r241174 r246112  
    436436        $atts['rel']    = ! empty( $item->xfn )        ? $item->xfn        : '';
    437437        $atts['href']   = ! empty( $item->url )        ? $item->url        : '';
    438         $atts['role']   = ! empty( $item->role )       ? $item->role       : '';
     438        $atts['role']   = ! empty( $item->role )       ? $item->role       : 'menuitem';
    439439
    440440        if ( in_array('menu-item-has-children', $item->classes) && 0 == $depth ) {
  • trunk/Websites/webkit.org/wp-content/themes/webkit/widgets/post.php

    r237752 r246112  
    6969                <div class="background-image">
    7070                    <svg viewbox="0 0 100 100">
    71                         <use xlink:href="#<?php echo esc_attr(get_post_icon()); ?>" />
     71                        <use xlink:href="#<?php echo esc_attr(get_post_icon()); ?>" aria-label="<?php echo esc_attr(str_replace('-',' ', get_post_icon())); ?> icon" />
    7272                    </svg>
    7373                    <div class="featured-image"<?php echo $image; ?>></div>
Note: See TracChangeset for help on using the changeset viewer.