jenkins-bot has submitted this change and it was merged.

Change subject: Make edit link and watchstar accessible to ios voiceover
......................................................................


Make edit link and watchstar accessible to ios voiceover

* Give the edit link a element a title attribute
* Make watchstar element a button instead of span

Bug: T87670
Change-Id: Idd36b57e046c7a429aff827aaaf49dbd1f679c20
---
M resources/mobile.editor/init.js
M resources/mobile.pagelist.styles/pagelist.less
M resources/mobile.watchstar/Watchstar.js
M resources/skins.minerva.base.styles/pageactions.less
M tests/browser/features/support/pages/article_page.rb
5 files changed, 20 insertions(+), 5 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mobile.editor/init.js b/resources/mobile.editor/init.js
index c2322f9..403d10c 100644
--- a/resources/mobile.editor/init.js
+++ b/resources/mobile.editor/init.js
@@ -45,7 +45,10 @@
         */
        function addEditButton( section, container ) {
                return $( '<a class="edit-page">' )
-                       .attr( 'href', '#/editor/' + section )
+                       .attr( {
+                               href: '#/editor/' + section,
+                               title: $( container ).attr( 'title' )
+                       } )
                        .text( mw.msg( 'mobile-frontend-editor-edit' ) )
                        .prependTo( container );
        }
diff --git a/resources/mobile.pagelist.styles/pagelist.less 
b/resources/mobile.pagelist.styles/pagelist.less
index 2854909..df92725 100644
--- a/resources/mobile.pagelist.styles/pagelist.less
+++ b/resources/mobile.pagelist.styles/pagelist.less
@@ -55,6 +55,12 @@
                        top: @itemPaddingV;
                        // undo thumbnail damage
                        margin-top: 1px;
+
+                       button {
+                               position: absolute;
+                               text-indent: inherit;
+                               outline: none;
+                       }
                }
 
                > a {
diff --git a/resources/mobile.watchstar/Watchstar.js 
b/resources/mobile.watchstar/Watchstar.js
index f56875b..789a3a6 100644
--- a/resources/mobile.watchstar/Watchstar.js
+++ b/resources/mobile.watchstar/Watchstar.js
@@ -61,7 +61,7 @@
                },
                tagName: 'div',
                className: watchIcon.getClassName(),
-               template: mw.template.compile( '<span>{{tooltip}}</span>', 
'hogan' ),
+               template: mw.template.compile( '<button>{{tooltip}}</button>', 
'hogan' ),
                /** @inheritdoc */
                initialize: function ( options ) {
                        var self = this,
diff --git a/resources/skins.minerva.base.styles/pageactions.less 
b/resources/skins.minerva.base.styles/pageactions.less
index 92298d3..edb8c13 100644
--- a/resources/skins.minerva.base.styles/pageactions.less
+++ b/resources/skins.minerva.base.styles/pageactions.less
@@ -62,7 +62,8 @@
 
                input,
                a,
-               span {
+               span,
+               button {
                        // Needed for non-JavaScript users
                        position: absolute;
                        display: block;
@@ -72,6 +73,11 @@
                        margin: 0 0 8px;
                }
 
+               button {
+                       text-indent: inherit;
+                       outline: none;
+               }
+
                &:first-child {
                        margin-top: 3px;
                }
diff --git a/tests/browser/features/support/pages/article_page.rb 
b/tests/browser/features/support/pages/article_page.rb
index 91eb105..edec96d 100644
--- a/tests/browser/features/support/pages/article_page.rb
+++ b/tests/browser/features/support/pages/article_page.rb
@@ -48,8 +48,8 @@
   end
 
   ## watch star
-  span(:watch_star, text: 'Watch this page')
-  span(:unwatch_star, text: 'Stop watching')
+  button(:watch_star, text: 'Watch this page')
+  button(:unwatch_star, text: 'Stop watching')
   button(:watch_confirm, class: 'mw-htmlform-submit')
 
   # search

-- 
To view, visit https://gerrit.wikimedia.org/r/235134
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd36b57e046c7a429aff827aaaf49dbd1f679c20
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen <rm...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Phuedx <g...@samsmith.io>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to