');
@@ -1102,15 +1107,13 @@ public function form_label($field, $style, $columns, $prefixed, $suffixed, $cols
$this->output('');
- if ($prefixed) {
- $this->output('');
+ $this->output('');
+ if ($prefixed) {
$this->form_field($field, $style);
}
$this->output(@$field['label']);
-
- if ($prefixed)
- $this->output(' ');
+ $this->output(' ');
if ($suffixed) {
$this->output(' ');
@@ -1389,7 +1392,7 @@ public function form_error($field, $style, $columns)
{
$tag = ($columns > 1) ? 'span' : 'div';
- $this->output('<' . $tag . ' class="qa-form-' . $style . '-error">' . $field['error'] . '' . $tag . '>');
+ $this->output('<' . $tag . ' role="alert" aria-describedby="' . $field['id'] . '" class="qa-form-' . $style . '-error">' . $field['error'] . '' . $tag . '>');
}
public function form_note($field, $style, $columns)
@@ -1653,9 +1656,9 @@ public function q_list_form($q_list)
public function q_list($q_list)
{
if (isset($q_list['qs'])) {
- $this->output('', '');
+ $this->output('
', '');
$this->q_list_items($q_list['qs']);
- $this->output(' ', '');
+ $this->output(' ', '');
}
}
@@ -1689,7 +1692,7 @@ public function q_item_stats($q_item)
public function q_item_main($q_item)
{
- $this->output('');
+ $this->output('
');
$this->view_count($q_item);
$this->q_item_title($q_item);
@@ -1699,7 +1702,7 @@ public function q_item_main($q_item)
$this->post_tags($q_item, 'qa-q-item');
$this->q_item_buttons($q_item);
- $this->output(' ');
+ $this->output('');
}
public function q_item_clear()
@@ -1806,7 +1809,11 @@ public function vote_count($post)
$this->output_split($post['upvotes_view'], 'qa-upvote-count');
$this->output_split($post['downvotes_view'], 'qa-downvote-count');
} else {
- $this->output_split($post['netvotes_view'], 'qa-netvote-count');
+ $post['netvotes_view']['prefix'] = '' . qa_lang_html('main/netvote_of_question') . ' ';
+ if ($post['raw']['netvotes'] < 0) {
+ $post['netvotes_view']['prefix'] .= ' minus ';
+ }
+ $this->output_split($post['netvotes_view'], 'qa-netvote-count');
}
$this->output('');
@@ -1995,7 +2002,8 @@ public function post_meta_who($post, $class)
// You can also use $post['level'] to get the author's privilege level (as a string)
if (isset($post['who']['points'])) {
- $post['who']['points']['prefix'] = '(' . $post['who']['points']['prefix'];
+ $post['who']['points']['aria-hidden'] = true;
+ $post['who']['points']['prefix'] = '(' . $post['who']['points']['prefix'];
$post['who']['points']['suffix'] .= ')';
$this->output_split($post['who']['points'], $class . '-who-points');
}
@@ -2023,9 +2031,9 @@ public function post_tags($post, $class)
public function post_tag_list($post, $class)
{
- $this->output('');
-
- foreach ($post['q_tags'] as $taghtml) {
+ $this->output('' . qa_lang_html('main/list_of') . ' ' . qa_lang_html('main/nav_tags') . ' ');
+ $this->output('');
+ foreach ($post['q_tags'] as $taghtml) {
$this->post_tag_item($taghtml, $class);
}
@@ -2277,9 +2285,9 @@ public function a_list($a_list)
if (!empty($a_list)) {
$this->part_title($a_list);
- $this->output('', '');
+ $this->output('
', '');
$this->a_list_items($a_list['as']);
- $this->output(' ', '');
+ $this->output(' ', '');
}
}
@@ -2294,7 +2302,7 @@ public function a_list_item($a_item)
{
$extraclass = @$a_item['classes'] . ($a_item['hidden'] ? ' qa-a-list-item-hidden' : ($a_item['selected'] ? ' qa-a-list-item-selected' : ''));
- $this->output(' ', '');
+ $this->output(' ', '');
}
public function a_item_main($a_item)
@@ -2388,9 +2396,9 @@ public function c_form($c_form)
public function c_list($c_list, $class)
{
if (!empty($c_list)) {
- $this->output('', '');
+ $this->output('', '
');
$this->c_list_items($c_list['cs']);
- $this->output(' ', '');
+ $this->output(' ', '');
}
}
@@ -2405,7 +2413,7 @@ public function c_list_item($c_item)
{
$extraclass = @$c_item['classes'] . (@$c_item['hidden'] ? ' qa-c-item-hidden' : '');
- $this->output(' ');
+ $this->output(' ');
}
public function c_item_main($c_item)
diff --git a/qa-theme/Classic/qa-styles.css b/qa-theme/Classic/qa-styles.css
index 4d71f43a5..3f3e72be2 100644
--- a/qa-theme/Classic/qa-styles.css
+++ b/qa-theme/Classic/qa-styles.css
@@ -474,3 +474,14 @@ h2 {font-size:16px; padding-top:12px; clear:both;}
0% { background-color: #ffffaa; }
100% { background-color: #fff; }
}
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
+}
diff --git a/qa-theme/SnowFlat/qa-styles.css b/qa-theme/SnowFlat/qa-styles.css
index e0dd0dbef..c58330cdb 100644
--- a/qa-theme/SnowFlat/qa-styles.css
+++ b/qa-theme/SnowFlat/qa-styles.css
@@ -1812,6 +1812,16 @@ input[type="submit"], button {
cursor: pointer;
text-align: center;
}
+@media (max-width: 479px) {
+ input[type="file"] {
+ max-width: 220px;
+ }
+}
+@media (max-width: 359px) {
+ input[type="file"] {
+ max-width: 180px;
+ }
+}
[class^="qa-part-form"],
[class^="qa-part-custom"] {
@@ -3537,6 +3547,17 @@ input[type="submit"], button {
-moz-osx-font-smoothing: grayscale;
}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
+}
+
.icon-chat:before { content: '\e800'; }
.icon-help:before { content: '\e801'; }
.icon-comment:before { content: '\e802'; }
diff --git a/qa-theme/SnowFlat/qa-theme.php b/qa-theme/SnowFlat/qa-theme.php
index 921768b79..6e3fc573b 100644
--- a/qa-theme/SnowFlat/qa-theme.php
+++ b/qa-theme/SnowFlat/qa-theme.php
@@ -218,9 +218,9 @@ public function nav_main_sub()
$this->output('');
$this->nav_user_search();
$this->logo();
- $this->nav('main');
+ $this->nav('main', null, "main navigation");
$this->output(' ');
- $this->nav('sub');
+ $this->nav('sub', null, "sub navigation");
}
/**
@@ -320,7 +320,7 @@ public function sidepanel()
return;
$this->output('
');
- $this->output('');
+ $this->output('
');
$this->qam_search();
$this->widgets('side', 'top');
$this->sidebar();
@@ -330,7 +330,7 @@ public function sidepanel()
$this->output_raw($this->content['sidepanel']);
$this->feed();
$this->widgets('side', 'bottom');
- $this->output(' ', '');
+ $this->output(' ', '');
}
/**
@@ -638,11 +638,12 @@ public function attribution()
*/
private function qam_user_account()
{
- if (qa_is_logged_in()) {
+ $loginLinkLabel = 'Log in';
+ if (qa_is_logged_in()) {
// get logged-in user avatar
$handle = qa_get_logged_in_user_field('handle');
$toggleClass = 'qam-logged-in';
-
+ $loginLinkLabel = "Open dropdown for logged in user {$handle}";
if (QA_FINAL_EXTERNAL_USERS)
$tobar_avatar = qa_get_external_avatar_html(qa_get_logged_in_user_field('userid'), $this->nav_bar_avatar_size, true);
else {
@@ -672,10 +673,10 @@ private function qam_user_account()
// finally output avatar with div tag
$handleBlock = empty($handle) ? '' : '' . qa_html($handle) . '
';
$this->output(
- ''
+ ''
);
}