Skip to content

Commit c515b17

Browse files
author
Mike Taylor
committed
Merge branch 'js-features' of https://github.com/tagawa/webcompat.com into tagawa-js-features
* 'js-features' of https://github.com/tagawa/webcompat.com: Enabled 'g' key to open GitHub issues page Enabled 'g' key to open GitHub issues page Issue #363 - Fix tests to account for now markup. Issue #390 - Make Issues page title smaller Issue #390 - Issue title too big. Another Tab -> Space Accessibility Fixes
2 parents 6819b96 + cd01437 commit c515b17

20 files changed

+65
-39
lines changed

tests/functional/lib/issue-list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ define([
1919
return this.remote
2020
.setFindTimeout(intern.config.wc.pageLoadTimeout)
2121
.get(require.toUrl(url))
22-
.findByCssSelector('h2').getVisibleText()
22+
.findByCssSelector('h1').getVisibleText()
2323
.then(function (text) {
2424
assert.include(text, 'Issues', 'Page header displayed');
2525
})

tests/functional/lib/issues.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ define([
2222
.setFindTimeout(intern.config.wc.pageLoadTimeout)
2323
.get(require.toUrl(url(100)))
2424
.sleep(1000)
25-
.findByCssSelector('h2.Issue-title').getVisibleText()
25+
.findByCssSelector('h1.Issue-title').getVisibleText()
2626
.then(function (text) {
2727
assert.include(text, 'Issue 100:', 'Issue title displayed');
2828
})
@@ -64,7 +64,7 @@ define([
6464
.setFindTimeout(intern.config.wc.pageLoadTimeout)
6565
// TODO: uh, update this in the future
6666
.get(require.toUrl(url(999999)))
67-
.findByCssSelector('#pageerror h2').getVisibleText()
67+
.findByCssSelector('#pageerror h1').getVisibleText()
6868
.then(function (text) {
6969
assert.include(text, '(404)', 'We\'re at the 404.');
7070
});

webcompat/static/css/development/layout/utilities.css

+4
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@
5252
.wc-hidden {
5353
display:none;
5454
}
55+
.wc-sronly {
56+
position: absolute;
57+
top: -999px;
58+
}

webcompat/static/css/development/page/issue-list.css

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
.IssueList {
66
font-size:var(--base-font-size);
77
}
8+
/* Main page title */
9+
.IssueList-title {
10+
font-size: 2em;
11+
}
812
/*Search issues */
913
.IssueList-search {
1014
background-color:#F7F7F7;

webcompat/static/css/development/page/issues.css

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
}
77
/* Wrapper title and date issue */
88
.Issue-title {
9+
font-size: 2em;
910
line-height: 1em;
1011
margin-bottom: .5em;
1112
word-wrap: break-word;

webcompat/static/js/lib/issue-list.js

+7
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,16 @@ issueList.IssueView = Backbone.View.extend({
446446
issueList.MainView = Backbone.View.extend({
447447
el: $('.js-issue-page'),
448448
events: {},
449+
keyboardEvents: {
450+
'g': 'githubWarp'
451+
},
449452
initialize: function() {
450453
this.initSubViews();
451454
},
455+
githubWarp: function() {
456+
var warpPipe = "http://github.com/" + repoPath;
457+
return location.href = warpPipe;
458+
},
452459
initSubViews: function() {
453460
this.issueList = new issueList.IssueView();
454461
this.issueSorter = new issueList.SortingView();

webcompat/templates/about.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% block body %}
33
<div class="page page--about about">
44
{% include "shared/nav.html" %}
5-
<div class="wc-content wc-content--body">
5+
<main class="wc-content wc-content--body" role="main">
66
<h2>About</h2>
77
<h3>Webcompat.com is developed by volunteers and supported by Mozilla. This site is an <span class="wc-bold" style="color:grey">open invitation for all web users, developers and browser vendors</span> to get involved in the web compatibility effort. Our goal is to make it easy to report and view problems for any part of the web.</h3>
88
<div class="u-textCenter about_media">
@@ -22,6 +22,6 @@ <h4>Web compatibility issues usually follow a three part life cycle:</h4>
2222
<strong class="about_bug_label">Getting Contacts and Reaching Out</strong>: To get any bug fixed you need a good contact. There are many ways to find a contact at a company or web site. Sometimes finding a contact can be easy. Other times it requires some creativity and luck. After finding a contact, the next step is to make contact and help resolve the issue. Webcompat.com aims to make this process easier by allowing developers to check for bugs with their sites and applications in one location.
2323
</div>
2424
<p>The web is big and keeps getting bigger. To make sure it’s all compatible we need help from people in all regions of the world. The great thing is anyone can help. You don’t need to be a techie and as little as 5 minutes can make a huge difference!</p>
25-
</div>
25+
</main>
2626
</div>
2727
{% endblock %}

webcompat/templates/contributors.html

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{% block body %}
33
<div>
44
{% include "shared/nav.html" %}
5+
<main role="main">
56
<div class="wc-Hero wc-Hero--contributors">
67
<div class="wc-content">
78
<div class="wc-Hero-section wc-Hero-section--left wc-Hero-section--contributors">
@@ -46,6 +47,7 @@ <h3><button class="contributors__item__btn" type="button">Contribute to this sit
4647
<div class="contributors__item__content page wc-content">{% include "contributors/contribute.html" %}</div>
4748
</div>
4849
</div>
50+
</main>
4951
</div>
5052
{% endblock %}
5153
{%- block extrascripts -%}

webcompat/templates/contributors/diagnose-bug.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<li class="contributors__list__item">
88
<span>Check the console to see if there are errors</span>
99
<div class="contributors__list__screenshot">
10-
<img src="../img/6consolesnapshot.jpg" alt"Console snapshot"/>
10+
<img src="../img/6consolesnapshot.jpg" alt="Console snapshot"/>
1111
</div>
1212
</li>
1313
<li class="contributors__list__item"><span>Google any errors</span></li>
1414
<li class="contributors__list__item"><span>Write a comment with your findings on the issue</span></li>
1515
<li class="contributors__list__item">
1616
<span>If you know how to fix the issue, or have information related to a fix, add it in a comment</span>
1717
<div class="contributors__list__screenshot">
18-
<img src="../img/9commentsnapshot.jpg" alt"Comment snapshot"/>
18+
<img src="../img/9commentsnapshot.jpg" alt="Comment snapshot"/>
1919
</div>
2020
</li>
2121
<li class="contributors__list__item"><span>If not, post what you tried on the issue</span></li>

webcompat/templates/contributors/reproduce-bug.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<li class="contributors__list__item">
33
<span>Find a bug that "Needs Diagnosis"</span>
44
<div class="contributors__list__screenshot">
5-
<img src="../img/1browsesnapshot.jpg" alt"Browser snapshot"/>
5+
<img src="../img/1browsesnapshot.jpg" alt="Browser snapshot"/>
66
</div>
77
</li>
88
<li class="contributors__list__item"><span>Make sure you have the same browser/OS running (if possible)</span></li>
99
<li class="contributors__list__item"><span>See if you can reproduce</span></li>
1010
<li class="contributors__list__item">
1111
<span>Comment on the issue with your findings</span>
1212
<div class="contributors__list__screenshot">
13-
<img src="../img/4issuesnapshot.jpg" alt"Browser snapshot"/>
13+
<img src="../img/4issuesnapshot.jpg" alt="Browser snapshot"/>
1414
</div>
1515
</li>
1616
</ul>

webcompat/templates/contributors/site-outreach.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<li class="contributors__list__item">
33
<span>Find a bug that is labeled "Ready for Outreach"</span>
44
<div class="contributors__list__screenshot">
5-
<img src="../img/1readyforoutreach.jpg" alt"Ready for outreach snapshot"/>
5+
<img src="../img/1readyforoutreach.jpg" alt="Ready for outreach snapshot"/>
66
</div>
77
</li>
88
<li class="contributors__list__item"><span>Now it's time to track down someone to help get the fix implemented, but first a few tips on doing outreach:</span></li>
@@ -18,7 +18,7 @@
1818
<li class="contributors__list__item contributors__list__item--lvl_down">
1919
<span>Chrome bug reports: <a title="Chrome bug reports" href="https://crbug.com/new">http://crbug.com/new</a></span>
2020
<div class="contributors__list__screenshot">
21-
<img src="../img/chromebugreport.jpg" alt"Chrome bug report snapshot"/>
21+
<img src="../img/chromebugreport.jpg" alt="Chrome bug report snapshot"/>
2222
</div>
2323
</li>
2424
<li class="contributors__list__item contributors__list__item--lvl_down"><span>Firefox bug reports: <a title="Firefox bug reports" href="https://bugzilla.mozilla.org/enter_bug.cgi">https://bugzilla.mozilla.org/enter_bug.cgi</a></span></li>
@@ -32,7 +32,7 @@
3232
<li class="contributors__list__item contributors__list__item--lvl_down">
3333
<span><strong>Does the web site have a support email or an issue tracker?</strong> This is a simple one, but there's no guarantee that your request will be addressed. Most of the time the responses are automatic but it's better than nothing. If in return you get an ID and/or a URI, put it in the issue comments.</span>
3434
<div class="contributors__list__screenshot">
35-
<img src="../img/2lastbullet_comment.jpg" alt"Comment snapshot"/>
35+
<img src="../img/2lastbullet_comment.jpg" alt="Comment snapshot"/>
3636
</div>
3737
</li>
3838
<li class="contributors__list__item contributors__list__item--lvl_down">
@@ -47,7 +47,7 @@
4747
<li><strong>Slideshare.</strong>
4848
When you can't find the information about a developer, you might want to try to search something such as $COMPANY_NAME site:slideshare.net or any appropriate keywords that will make you closer to a contact. Some companies have their developers speaking at conferences about issues with performances, etc. Be careful of talks related to sales or marketing. In the slides, there is often the contact information of the developer.
4949
<div class="contributors__list__screenshot">
50-
<img src="../img/slideshare.jpg" alt"Slideshare snapshot"/>
50+
<img src="../img/slideshare.jpg" alt="Slideshare snapshot"/>
5151
</div>
5252
</li>
5353
<li><strong>Github, etc.</strong>
@@ -56,7 +56,7 @@
5656
<li><strong>Web designer.</strong>
5757
Sometimes when you can't reach a web developer, you may try to reach web designers who have also their own type of social networks such as dribbble.com. Usually they have contacts with web developers and may be able to give an introduction. In some web agencies, the web designer will be a good initial contact. Again, be tactful and don't make the life of the web designer harder in his/her own company.
5858
<div class="contributors__list__screenshot">
59-
<img src="../img/webdesigner.jpg" alt"Webdesigner snapshot"/>
59+
<img src="../img/webdesigner.jpg" alt="Webdesigner snapshot"/>
6060
</div>
6161
</li>
6262
<li><strong>Corporate emails.</strong>

webcompat/templates/error.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{% block body %}
33
<div class="page page--404">
44
{% include "shared/nav.html" %}
5-
<div class="wc-content wc-content--body" id="pageerror">
6-
<h2>Yikes! {{ error_message }} ({{ error_code }})</h2>
7-
<h3>(sound of broken glass)</h3>
5+
<main class="wc-content wc-content--body" id="pageerror" role="main">
6+
<h1>Yikes! {{ error_message }} ({{ error_code }})</h1>
7+
<h2>(sound of broken glass)</h2>
88
<br>
99
<br>
1010
<a class="Button Button--action" href="/">Return home</a>
11-
</div>
11+
</main>
1212
</div>
1313
{% endblock %}

webcompat/templates/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- extends "layout.html" -%}
22
{%- block body -%}
33
{% include "topbar.html" %}
4+
<main role="main">
45
<div class="wc-Hero">
56
<div class="wc-content">
67
<div class="wc-Hero-section wc-Hero-section--left wc-Hero-section--home ">
@@ -92,6 +93,7 @@ <h2>Join The Team</h2>
9293
</div>
9394
</div>
9495
</div>
96+
</main>
9597
{% endblock %}
9698
{%- block extrascripts -%}
9799
{%- if config.PRODUCTION or config.DEVELOPMENT -%}

webcompat/templates/issue-list.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
{% block body %}
33
<div class="IssueList js-issue-page" data-username="{{ session.username }}">
44
{% include "shared/nav.html" %}
5+
<main role="main">
56
<div class="wc-content wc-content--body js-issuelist-filter">
67
<script type="text/template" id="issuelist-filter-tmpl">
78
<!-- Temporary Header -->
8-
<h2 class="wc-margin-bottom">Issues</h2>
9+
<h1 class="IssueList-title wc-margin-bottom">Issues</h1>
910
<div class="Dropdown Dropdown--large js-dropdown-wrapper"></div>
1011
<div>
1112
<button type="button" class="wc-Filter wc-Filter--untriaged" data-filter="untriaged">
@@ -30,8 +31,9 @@ <h2 class="wc-margin-bottom">Issues</h2>
3031
<div class="IssueList-search js-issuelist-search">
3132
<script type="text/template" id="issuelist-search-tmpl">
3233
<div class="wc-content IssueList-search-content">
33-
<input type="text" class="IssueList-search-form mousetrap" placeholder="Search by keyword">
34-
<button role="button" type="submit" class="r-ResetButton IssueList-search-button js-search-button"><span class="icon icon-search"></span></button>
34+
<label for="IssueList-search-input" class="wc-sronly">Search By Keyword</label>
35+
<input type="text" id="IssueList-search-input" class="IssueList-search-form mousetrap" placeholder="Search by keyword">
36+
<button role="button" type="submit" class="r-ResetButton IssueList-search-button js-search-button"><span class="wc-sronly">Search</span><span class="icon icon-search"></span></button>
3537
</div>
3638
</script>
3739
</div>
@@ -105,6 +107,7 @@ <h2 class="wc-margin-bottom">Issues</h2>
105107
</script>
106108
</div>
107109
</div>
110+
</main>
108111
</div>
109112

110113
<script type="text/template" id="dropdown-tmpl">
@@ -124,6 +127,7 @@ <h2 class="wc-margin-bottom">Issues</h2>
124127

125128
{% endblock %}
126129
{% block extrascripts %}
130+
<script>var repoPath="{{config['ISSUES_REPO_URI']}}"</script>
127131
{%- if config.PRODUCTION or config.DEVELOPMENT -%}
128132
<script src="{{ url_for('static', filename='js/issue-list.min.js') }}"></script>
129133
{% else %}

webcompat/templates/issue.html

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
{% block body %}
33
<div class="page page--issue">
44
{% include "shared/nav.html" %}
5-
<div class="wc-content wc-content--body Issue">
6-
<h2 class="Issue-title">
5+
<main class="wc-content wc-content--body Issue" role="main">
6+
<h1 class="Issue-title">
77
<script type="text/template" id="title-tmpl">
88
<a class="Issue-back" href="{{ url_for("show_issues") }}" title="All issues">
9+
<span class="wc-sronly">All Issues</span>
910
<span class="icon icon-arrow-left"></span>
1011
</a>
1112
Issue <%= number %>: <%- title %>
1213
</script>
13-
</h2>
14+
</h1>
1415
<div class="Issue-wrapper">
1516
<!-- Issue Date -->
1617
<div class="Issue-create">
@@ -34,7 +35,7 @@ <h2 class="Issue-title">
3435
<script type="text/template" id="issue-labels-tmpl">
3536
<span class="Label Label--title">Labels</span>
3637
{% if session.user_id and session.avatar_url %}
37-
<span class="LabelEditor-wrapper"><button class="LabelEditor-launcher icon icon-gear"></button></span>
38+
<span class="LabelEditor-wrapper"><button class="LabelEditor-launcher icon icon-gear"><span class="wc-sronly">Edit Labels</span></button></span>
3839
{% endif %}
3940
<span class="Label-list">
4041
<% _.each(labels, function(label) { %>
@@ -73,7 +74,8 @@ <h2 class="Issue-title">
7374
<div class="Comment-body Comment-body--caret">
7475
<!--<div class="Comment-drag">-->
7576
<!-- TODO(miket) <div class="comment__dd">Attach images by dragging &amp; dropping, <span class="comment__dd__label">selecting them</span> or pasting form the clipboad </div> -->
76-
<textarea class="Comment-wrapper Comment-text" placeholder="Leave a comment"></textarea>
77+
<label for="Comment-text" class="wc-sronly">Comment Text</label>
78+
<textarea id="Comment-text" class="Comment-wrapper Comment-text" placeholder="Leave a comment"></textarea>
7779
<!--</div>-->
7880
<div class="Comment-button">
7981
<button class="Button Button--action">
@@ -89,7 +91,7 @@ <h2 class="Issue-title">
8991
<p class="Issue-login">Please <a href="{{ url_for('login') }}">login</a> to edit issues.</p>
9092
{% endif %}
9193
</div>
92-
</div>
94+
</main>
9395
</div>
9496

9597
<script type="text/template" id="label-editor-tmpl">

webcompat/templates/privacy.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
{% block body %}
33
<div class="page page--privacy">
44
{% include "shared/nav.html" %}
5-
<div class="wc-content wc-content--body">
5+
<div class="wc-content wc-content--body" role="main">
66
<h2>Webcompat.com Privacy Policy</h2>
77
<small>Last Updated: December 4, 2014</small>
88
<h4>About Us</h4>
99
<p><a href="http://www.webcompat.com">Webcompat.com</a> allows you to report web compatibility issues though a simple webform. Volunteers view the reports, identify solutions, and share the reports and solutions with the website admins. For more details see our <a href="about">About page</a>.</p>
10-
<h4>Public Reports</h4>
10+
<h2>Public Reports</h2>
1111
<p>All reports are publicly accessible. Please do not include any confidential or personal information in the content of your report.</p>
1212
<p>The User Agent HTTP header that your browser sends will be recorded in the bug report, if you choose to report a bug, but is hidden by default.</p>
1313
<h4>Reporting Anonymously</h4>
1414
<p>If you choose the anonymous option, the only information that we’ll receive is the content of your report.</p>
15-
<h4>Reporting via GitHub</h4>
15+
<h2>Reporting via GitHub</h2>
1616
<p>If you choose the GitHub option, webcompat.com will receive your GitHub username and avatar. You can revoke our access to this information at any time from the <a href="https://github.com/settings/applications">"Applications" section of your profile page</a>.</p>
17-
<h4>Cookies &amp; Analytics</h4>
17+
<h2>Cookies &amp; Analytics</h2>
1818
<p>If you log into our site using your GitHub user account, webcompat.com will use cookies to record your session information. The cookie will expire when the session ends, i.e., when you click "logout".</p>
1919
<p>Webcompat.com also uses Google Analytics to track usage statistics.</p>
20-
<h4>Contact Us</h4>
20+
<h2>Contact Us</h2>
2121
<p>You can <a href="https://twitter.com/webcompat">find us on Twitter</a> or on the <a href="https://lists.mozilla.org/listinfo/compatibility">public mailing list [email protected]</a> (<a href="https://groups.google.com/forum/#!forum/mozilla.compatibility">archive</a>). These are public forums, so please minimize any personal information you choose to share.</p>
22-
</div>
22+
</main>
2323
</div>
2424
{% endblock %}

webcompat/templates/shared/footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<footer class="wc-Footer">
1+
<footer class="wc-Footer" role="contentinfo">
22
<div class="wc-content wc-content--footer">
33
<ul class="wc-Footer-section wc-Footer-section--left">
44
<li class="wc-Footer-item"><a class="wc-Footer-item-link wc-Footer-item-link--separator" href="{{ url_for('about') }}">About</a></li><!--

webcompat/templates/shared/nav.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<header class="wc-Navbar">
1+
<header class="wc-Navbar" role="banner">
22
<nav class="wc-content" role="navigation">
33
<div class="wc-Navbar-section wc-Navbar-section--left">
44
<a class="wc-Navbar-link" href="/">
@@ -11,7 +11,7 @@
1111
{% else %}
1212
<a class="wc-Navbar-link" href="{{ url_for('logout') }}">Logout</a>
1313
{% if session.user_id and session.avatar_url %}
14-
<img class="wc-Navbar-avatar" src=" {{ session.avatar_url }}s=40">
14+
<img class="wc-Navbar-avatar" src=" {{ session.avatar_url }}s=40" alt="User Avatar">
1515
{% endif %}
1616
{% endif %}
1717
</div>

webcompat/templates/thanks.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% block body %}
33
<div class="page page--thanks">
44
{% include "shared/nav.html" %}
5-
<div class="wc-content wc-content--body">
5+
<main class="wc-content wc-content--body" role="main">
66
<h2>Thank you.</h2>
77
<p>You're helping us make the web a better place to work and play.</p>
88
{% if config['PRODUCTION'] %}
@@ -13,6 +13,6 @@ <h2>Thank you.</h2>
1313
<p><a href="{{ url_for("index") }}">Return back home</a>.</p>
1414
<a class="Button Button--action" href="https://facebook.com/sharer/sharer.php?u={{ encoded_issue }}" target="_blank">Share on Facebook</a>
1515
<a class="Button Button--action" href="https://twitter.com/intent/tweet?text={{ encoded_text }}&url={{ encoded_issue }}&via=webcompat" target="_blank">Share on Twitter</a>
16-
</div>
16+
</main>
1717
</div>
1818
{% endblock %}

webcompat/templates/topbar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<header class="wc-Navbar">
1+
<header class="wc-Navbar" role="banner">
22
<nav class="wc-content" role="navigation">
33
<div class="wc-Navbar-section wc-Navbar-section--left">{%- if browser == 'firefox' %}
44
<a class="wc-Navbar-link" href="https://addons.mozilla.org/en-US/firefox/addon/webcompatcom-reporter/">Download our Firefox Add-on</a>

0 commit comments

Comments
 (0)