Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 9be3821

Browse files
Splaktarjelbourn
authored andcommitted
docs: address Lighthouse audit issues (#11475)
fix issues with background contrast remove ng-class expressions which applied unused classes add alt attributes to images add titles to iframes stop disabling user scaling (zooming) Fixes #11452
1 parent e97d5f1 commit 9be3821

File tree

7 files changed

+39
-29
lines changed

7 files changed

+39
-29
lines changed

docs/app/css/highlightjs-material.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ hljs .hljs-constant,
111111
.hljs-shebang,
112112
.apache .hljs-sqbracket,
113113
.tex .hljs-formula {
114-
color: #607D8B;
114+
color: #6d8c9b;
115115
}
116116

117117
.coffeescript .javascript,

docs/app/css/style.css

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ body.docs-body {
5656

5757

5858
.training_link {
59-
color: rgb(255,82,82);
59+
color: #D32F2F;
6060
text-transform: none;
6161
}
6262

@@ -65,7 +65,6 @@ body.docs-body {
6565
}
6666

6767
.training_info {
68-
opacity: 0.4;
6968
text-transform: none;
7069
}
7170
/***************
@@ -75,7 +74,7 @@ a {
7574
text-decoration: none;
7675
font-weight: 400;
7776
transition: border-bottom 0.35s;
78-
color: #1e88e5;
77+
color: #1565C0;
7978
}
8079
a:visited {
8180
color: #7e57c2;
@@ -138,9 +137,13 @@ strong {
138137
background-color: #D1DEEC;
139138
}
140139
.md-api-table th {
141-
background-color: #4C9EF0;
140+
background-color: #1976D2;
142141
color: white;
143142
}
143+
.md-api-table code,
144+
.md-api-table a {
145+
background-color: rgba(255, 255, 255, 0.25);
146+
}
144147

145148
blockquote {
146149
border-left: 3px solid rgba(0, 0, 0, 0.12);
@@ -216,7 +219,7 @@ pre > code.highlight {
216219

217220
code {
218221
font-size: 1.4rem;
219-
background: rgba(0, 0, 0, 0.065);
222+
background: rgba(0, 0, 0, 0.05);
220223
}
221224

222225
code.highlight {
@@ -225,10 +228,9 @@ code.highlight {
225228
}
226229

227230
code:not(.highlight) {
228-
color: #106CC8;
231+
color: #1565C0;
229232
margin-left: 1px;
230233
margin-right: 1px;
231-
-webkit-font-smoothing: auto;
232234
padding: 0.125em 0.35em;
233235
border-radius: 2px;
234236
}
@@ -303,7 +305,7 @@ body[dir=rtl] .docs-menu .md-button {
303305

304306
.docs-menu .md-button:hover,
305307
.docs-menu .md-button:focus {
306-
background: #267ED5 !important;
308+
background: #1D77D5 !important;
307309
}
308310
.docs-menu .md-button md-icon {
309311
color: white;
@@ -336,7 +338,7 @@ body[dir=rtl] .docs-menu .md-button {
336338
padding: 0;
337339
}
338340
.docs-menu .md-button.active {
339-
background: #267ED5;
341+
background: #1D77D5;
340342
}
341343
.menu-heading {
342344
display: block;
@@ -345,9 +347,12 @@ body[dir=rtl] .docs-menu .md-button {
345347
padding: 8px 16px 0;
346348
text-align: left;
347349
width: 100%;
348-
color: rgba(255, 255, 255, 0.54)
349350
}
350-
351+
.menu-heading>a {
352+
color: white;
353+
font-weight: 700;
354+
font-size: 12px;
355+
}
351356

352357
html[dir=rtl] .menu-heading,
353358
body[dir=rtl] .menu-heading {
@@ -411,7 +416,7 @@ body[dir=rtl] .menu-heading {
411416
.nav-header {
412417
background-color: #106CC8;
413418
background: linear-gradient(#185694, #106cc8);
414-
border-bottom: 1px solid #267ED5;
419+
border-bottom: 1px solid #1D77D5;
415420
flex-shrink: 0;
416421
z-index: 2;
417422
}
@@ -559,9 +564,10 @@ md-tabs.demo-source-tabs .active md-tab-label {
559564
md-toolbar.demo-toolbar {
560565
border-radius: 3px 3px 0 0;
561566
box-shadow: 0 1px rgba(255, 255, 255, 0.1);
567+
color: white;
562568
}
563569
md-toolbar.demo-toolbar md-tab-label {
564-
color: #99E4EE
570+
color: #99E4EE;
565571
}
566572
md-toolbar.demo-toolbar .md-button:hover {
567573
background: rgba(0,0,0,0.1);
@@ -779,7 +785,7 @@ ul.methods > li:first-child > *:first-child {
779785
}
780786

781787
.version-picker {
782-
background: #267ED5 !important;
788+
background: #1D77D5 !important;
783789
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
784790
margin-bottom: 1px !important;
785791
}
@@ -813,6 +819,9 @@ docs-demo .doc-demo-content {
813819
.service-desc > p:last-child {
814820
margin-bottom: 0;
815821
}
822+
.service-desc code {
823+
background-color: rgba(255, 255, 255, 0.25);
824+
}
816825

817826
/* Styles for Windows High Contrast mode */
818827
@media screen and (-ms-high-contrast: active) {

docs/app/partials/getting-started.tmpl.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h2>How do I start with AngularJS Material?</h2>
5656
<li>Use the "Edit on CodePen" button on any of our Demos<br/>
5757
<img
5858
src="https://cloud.githubusercontent.com/assets/210413/11568997/ed86795a-99b4-11e5-898e-1da172be80da.png"
59-
style="width:75%;margin: 10px 30px 0 0">
59+
style="width:75%;margin: 10px 30px 0 0" alt="Image with arrow to Edit on CodePen button">
6060
</li>
6161
</ul>
6262

@@ -67,7 +67,7 @@ <h3>Build a Material Application (blank shell)</h3>
6767
the AngularJS Material library from the Google CDN:
6868
</p>
6969

70-
<iframe height='777' scrolling='no'
70+
<iframe height='777' scrolling='no' title="AngularJS Material - Blank Starter"
7171
src='https://codepen.io/team/AngularMaterial/embed/RrbXyW/?height=777&theme-id=21180&default-tab=html'
7272
frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>
7373
See the Pen <a
@@ -95,7 +95,7 @@ <h3>Our CodePen Community</h3>
9595
<a href="https://codepen.io/team/AngularMaterial/collections/public/" target="_blank">Collections</a>, and ideas.
9696
</p>
9797
<div layout-align="center" style="width: 100%">
98-
<iframe height='777' scrolling='no'
98+
<iframe height='777' scrolling='no' title="Our CodePen Community"
9999
src='https://codepen.io/collection/XExqGz/'
100100
frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>
101101
</iframe>

docs/app/partials/home.tmpl.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ <h2 class="md-headline">Training Videos:</h2>
188188
<ul class="buckets" layout layout-align="center center" layout-wrap>
189189
<li flex="100" flex-gt-xs="50" ng-repeat="(index, link) in [
190190
{ href: 'https://egghead.io/series/angular-material-introduction', icon: 'ondemand_video', text: 'Introduction to AngularJS Material', site : 'EggHead', access : 'free'},
191-
{ href: 'https://app.pluralsight.com/player?author=ajden-towfeek&name=angular-material-fundamentals-m0&mode=live&clip=0&course=angular-material-fundamentals', icon: 'ondemand_video', text: 'AngularJS Material Fundamentals', site : 'Pluralsight', access: 'member'},
191+
{ href: 'https://app.pluralsight.com/player?author=ajden-towfeek&name=angular-material-fundamentals-m0&mode=live&clip=0&course=angular-material-fundamentals', icon: 'ondemand_video', text: 'AngularJS Material Fundamentals', site : 'Pluralsight', access: 'member'}
192192
]">
193193
<md-button
194194
class="md-primary md-raised"
195195
target="_blank"
196196
aria-label="{{link.text}}"
197197
ng-href="{{link.href}}">
198198
<md-icon class="block" md-svg-src="img/icons/ic_{{link.icon}}_24px.svg"></md-icon>
199-
{{link.site}} | <span style="color: rgb(255,82,82); text-transform: none;">{{link.text}}</span> | <span class="training_info">{{link.access}}</span>
199+
{{link.site}} | <span class="training_link">{{link.text}}</span> | <span class="training_info">{{link.access}}</span>
200200
</md-button>
201201
</li>
202202
</ul>
@@ -210,7 +210,7 @@ <h2 class="md-headline">Conference Presentations:</h2>
210210
<ul class="buckets" layout layout-align="center center" layout-wrap>
211211
<li flex="100" flex-gt-xs="50" ng-repeat="(index, link) in [
212212
{ href: 'https://www.youtube.com/watch?v=Qi31oO5u33U', icon: 'ondemand_video', text: 'Building with AngularJS Material', site : 'ng-conf', date: '2015'},
213-
{ href: 'https://www.youtube.com/watch?v=363o4i0rdvU', icon: 'ondemand_video', text: 'AngularJS Material in Practice', site : 'AngularConnect', date:'2015'},
213+
{ href: 'https://www.youtube.com/watch?v=363o4i0rdvU', icon: 'ondemand_video', text: 'AngularJS Material in Practice', site : 'AngularConnect', date:'2015'}
214214
]">
215215
<md-button
216216
class="md-primary md-raised"
@@ -250,7 +250,7 @@ <h2 class="md-headline">Google's Material Design</h2>
250250
<p class="md-caption" style="text-align: center; margin-bottom: 0;">
251251
These docs were generated from
252252
(<a ng-href="{{BUILDCONFIG.repository}}/{{menu.version.current.github}}" target="_blank"
253-
rel="noopener" class="md-accent">v{{BUILDCONFIG.version}} - SHA {{BUILDCONFIG.commit.substring(0,7)}}</a>)
253+
rel="noopener">v{{BUILDCONFIG.version}} - SHA {{BUILDCONFIG.commit.substring(0,7)}}</a>)
254254
on (<strong>{{BUILDCONFIG.date}}</strong>) GMT.
255255
</p>
256256
</md-content>

docs/app/partials/layout-introduction.tmpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h3>Overview</h3>
8080
href="https://camo.githubusercontent.com/ad81ae92f8b4285747ce4e48007bf3f104dd5630/687474703a2f2f6d6174657269616c2d64657369676e2e73746f726167652e676f6f676c65617069732e636f6d2f7075626c6973682f6d6174657269616c5f765f342f6d6174657269616c5f6578745f7075626c6973682f3042386f6c5631354a3761625053474678656d46695156527462316b2f6c61796f75745f61646170746976655f627265616b706f696e74735f30312e706e67"
8181
target="_blank"><img
8282
src="https://camo.githubusercontent.com/ad81ae92f8b4285747ce4e48007bf3f104dd5630/687474703a2f2f6d6174657269616c2d64657369676e2e73746f726167652e676f6f676c65617069732e636f6d2f7075626c6973682f6d6174657269616c5f765f342f6d6174657269616c5f6578745f7075626c6973682f3042386f6c5631354a3761625053474678656d46695156527462316b2f6c61796f75745f61646170746976655f627265616b706f696e74735f30312e706e67"
83-
alt=""
83+
alt="Breakpoints as specified in the Material Design Spec"
8484
style="max-width:100%;"></a>
8585
</p>
8686

docs/config/template/index.template.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<!doctype html>
22
<html ng-app="docsApp" ng-controller="DocsCtrl" lang="en" ng-strict-di>
33
<head>
4+
<meta charset="utf-8">
45
<base href="/">
56
<title ng-bind="'AngularJS Material - ' + menu.currentSection.name +
67
(menu.currentSection === menu.currentPage ? '' : ' > ' + menu.currentPage.name)">
78
AngularJS Material
89
</title>
910
<link rel="icon" type="image/x-icon" href="favicon.ico" />
10-
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
11+
<meta name="viewport" content="width=device-width, initial-scale=1">
1112
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
1213
<link rel="stylesheet" href="angular-material.min.css">
1314
<link rel="stylesheet" href="docs.css">
@@ -33,7 +34,7 @@ <h1 class="docs-logotype md-heading">AngularJS Material</h1>
3334

3435
<md-content flex role="navigation">
3536
<ul class="docs-menu">
36-
<li ng-repeat="section in menu.sections" class="parent-list-item {{section.className || ''}}" ng-class="{'parentActive' : isSectionSelected(section)}">
37+
<li ng-repeat="section in menu.sections" class="parent-list-item {{section.className || ''}}">
3738
<h2 class="menu-heading md-subhead" ng-if="section.type === 'heading'" id="heading_{{ section.name | nospace }}">
3839
{{section.name}}
3940
</h2>
@@ -42,7 +43,7 @@ <h2 class="menu-heading md-subhead" ng-if="section.type === 'heading'" id="headi
4243
<menu-toggle section="section" ng-if="section.type === 'toggle' && !section.hidden"></menu-toggle>
4344

4445
<ul ng-if="section.children" class="menu-nested-list">
45-
<li ng-repeat="child in section.children" ng-class="{'childActive' : isSectionSelected(child)}">
46+
<li ng-repeat="child in section.children">
4647
<menu-link section="child" ng-if="child.type === 'link'"></menu-link>
4748

4849
<menu-toggle section="child" ng-if="child.type === 'toggle'"></menu-toggle>
@@ -159,9 +160,9 @@ <h2 class="md-toolbar-item md-breadcrumb md-headline">
159160
<div layout="row" flex="noshrink" layout-align="center center">
160161
<div id="license-footer" flex>
161162
Powered by Google &copy;2014&#8211;{{thisYear}}.
162-
Code licensed under the <a ng-href="./license" class="md-accent">MIT License</a>.
163+
Code licensed under the <a ng-href="./license">MIT License</a>.
163164
Documentation licensed under
164-
<a href="http://creativecommons.org/licenses/by/4.0/" target="_blank" class="md-default-theme md-accent">CC BY 4.0</a>.
165+
<a href="http://creativecommons.org/licenses/by/4.0/" target="_blank">CC BY 4.0</a>.
165166
</div>
166167
</div>
167168

src/components/autocomplete/demoFloatingLabel/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<md-content class="md-padding">
33
<form ng-submit="$event.preventDefault()" name="searchForm">
44
<p>The following example demonstrates floating labels being used as a normal form element.</p>
5-
<div layout-gt-sm="row">
5+
<div layout-gt-sm="row" style="background-color: white" class="md-padding">
66
<md-input-container flex>
77
<label for="floatingLabelName">Name</label>
88
<input id="floatingLabelName" type="text"/>

0 commit comments

Comments
 (0)