From 4b423340012ff4b8c1588a0e3091301f9d9c73df Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 27 Mar 2020 23:39:37 +0000 Subject: [PATCH] Help/About: Improve accessibility of the 5.4 About page: * Remove vertical text and unnecessary italics. * Update H1 headings on About, Credits, Freedoms, Privacy pages to be unique to each page. Props sabernhardt, ryelle, melchoyce, karmatosed, audrasjb, afercia, davidbaumwald, SergeyBiryukov. See #49295. git-svn-id: https://develop.svn.wordpress.org/trunk@47521 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 9 +-- src/wp-admin/credits.php | 47 ++++++++++------ src/wp-admin/css/about.css | 111 ++++++++++++------------------------- src/wp-admin/freedoms.php | 6 +- src/wp-admin/privacy.php | 6 +- 5 files changed, 74 insertions(+), 105 deletions(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index acaaa2a009..c14c1bfc50 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -20,10 +20,10 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
-

+

-

+

@@ -41,7 +41,8 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
-

+

+

@@ -105,7 +106,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
  • -

    Gutenberg plugin. You’ll get to be the first to use new and exciting features in the block editor, before anyone else has seen them!' ); ?>

    +

    Gutenberg plugin. You’ll get to be the first to use new and exciting features in the block editor, before anyone else has seen them!' ); ?>

    diff --git a/src/wp-admin/credits.php b/src/wp-admin/credits.php index 60b1ebb004..2fdb1266da 100644 --- a/src/wp-admin/credits.php +++ b/src/wp-admin/credits.php @@ -22,10 +22,10 @@ $credits = wp_credits();
    -

    +

    -

    +

    @@ -42,28 +42,39 @@ $credits = wp_credits();
    -
    +
    -

    +

    + +

    worldwide team of passionate individuals. Get involved in WordPress.' ), - __( 'https://wordpress.org/about/' ), - __( 'https://make.wordpress.org/' ) - ); - } else { - printf( - /* translators: %s: https://make.wordpress.org/ */ - __( 'Want to see your name in lights on this page? Get involved in WordPress.' ), - __( 'https://make.wordpress.org/' ) - ); - } + printf( + /* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */ + __( 'WordPress is created by a worldwide team of passionate individuals. Get involved in WordPress.' ), + __( 'https://wordpress.org/about/' ), + __( 'https://make.wordpress.org/' ) + ); ?>

    + + + +

    + +

    +

    + Get involved in WordPress.' ), + __( 'https://make.wordpress.org/' ) + ); + ?> +

    + +
    diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 51e49261d6..6e9e52c25c 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -99,6 +99,7 @@ .about__section { background: #f3f4f5; background: var(--background); + clear: both; } .about__container .has-accent-background-color { @@ -303,13 +304,17 @@ } .about__container h1 { - font-size: 5em; - line-height: 1; + margin: 0 0 1em; + padding: 0; + font-weight: 600; + color: inherit; } +.about__container h1, .about__container h2 { margin-top: 0; font-size: 1.4em; + line-height: 1.4; } .about__container h3 { @@ -395,17 +400,7 @@ text-align: center; } -@media screen and (max-width: 782px) { - .about__container h1 { - font-size: 4em; - } -} - @media screen and (max-width: 480px) { - .about__container h1 { - font-size: 3.2em; - } - .about__section.is-feature { font-size: 1.4em; font-weight: 500; @@ -415,22 +410,17 @@ /* 1.3 - Header */ .about__header { - display: -ms-grid; - display: grid; - -ms-grid-columns: 1fr 1fr; - grid-template-columns: 1fr 1fr; - -ms-grid-rows: 1fr 1fr; - grid-template-rows: 1fr 1fr; - min-height: 30em; - max-height: 42em; - height: 90vh; margin-bottom: 32px; background-color: #f3f4f5; background-color: var(--background); background-repeat: no-repeat; - background-position: top center; + background-position: top right; background-size: contain; - background-image: url('https://wordpress.org/images/core/5.4/header.svg'); + background-image: url('https://wordpress.org/images/core/5.4/header-diagonal.svg'); +} + +.rtl .about__header { + background-image: url('https://wordpress.org/images/core/5.4/header-diagonal-rtl.svg'); } .about__header > div { @@ -442,49 +432,32 @@ } .about__header-title { - -ms-grid-column: 1; - grid-column: 1; - -ms-grid-row: 1; - -ms-grid-row-span: 2; - grid-row: 1/span 2; - padding: 32px; - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - transform: rotate(180deg); + min-height: 24em; + max-height: 32em; + height: 80vh; + padding: 0 32px; } -/* Needs to be inline-block to use vertical-align, needs specificity to override flex. */ -.about__header .about__header-title { - display: inline-block; - vertical-align: top; -} - -.about__header-title h1 { +.about__header-title p { + margin: 0; padding: 0; + font-size: 4em; + line-height: 1; + font-weight: 500; color: #1730e5; color: var(--accent-1); } -.about__header-title h1 span { - display: block; - font-weight: 600; - font-size: 1.2em; - line-height: 1; +.about__header-title p span { + display: inline-block; color: #216bce; color: var(--accent-2); } .about__header-text { - -ms-grid-column: 2; - grid-column: 2; - -ms-grid-row: 2; - grid-row: 2; - padding: 32px; + padding: 16px 32px 32px; font-size: 1.5em; line-height: 1.4; - text-align: right; - justify-self: flex-end; } .about__header-text p { @@ -492,11 +465,6 @@ } .about__header-navigation { - -ms-grid-column: 1; - -ms-grid-column-span: 2; - grid-column: 1/span 2; - -ms-grid-row: 3; - grid-row: 3; padding-top: 0; background: #216bce; background: var(--nav-background); @@ -543,31 +511,16 @@ .about__container .about__header-text { font-size: 1.4em; } -} - -@media screen and (max-width: 600px) { - .about__header { - display: block; - min-height: unset; - max-height: unset; - height: auto; - } .about__header-title { + min-height: 0; + max-height: none; + height: auto; /* - * 80% is a "magic" number to create a top offset approx-equal to the height of the background image, + * 60% is a "magic" number to create a top offset approx-equal to the height of the background image, * which scales to match the container width. */ - padding-top: 80%; - padding-bottom: 0; - -webkit-writing-mode: initial; - -ms-writing-mode: initial; - writing-mode: initial; - transform: none; - } - - .about__header-text { - text-align: left; + padding-top: 60%; } .about__header-navigation .nav-tab { @@ -578,6 +531,10 @@ } @media screen and (max-width: 480px) { + .about__header-title p { + font-size: 3.2em; + } + .about__header-navigation .nav-tab { float: none; display: block; diff --git a/src/wp-admin/freedoms.php b/src/wp-admin/freedoms.php index c9bc298866..454a647c0d 100644 --- a/src/wp-admin/freedoms.php +++ b/src/wp-admin/freedoms.php @@ -25,10 +25,10 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
    -

    +

    -

    +

    @@ -46,7 +46,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
    -

    +

    -

    +

    -

    +

    @@ -41,7 +41,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
    -

    +