Deployment plan
- Thursday, 24 Nov: Announce change on pl.wiki (T314714#8420500)
- Tuesday, 29 Nov: Deploy to pl.wiki (https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/856551)
- Monday, 5 Dec: Deploy to group 0 (https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/856552)
- Monday, 12 Dec: Announce change in Tech News (https://meta.wikimedia.org/wiki/Tech/News/2022/50)
- Tuesday, 3 Jan (2023): Deploy to group 1 (https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/874855)
- Tuesday, 10 Jan (2023): Deploy to group 2 minus en.wiki (https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/878168)
- Tuesday, 17 Jan (2023): Deploy to en.wiki (https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/878169)
For Tech/News readers
(Announced in https://meta.wikimedia.org/wiki/Tech/News/2022/50)
Comparison of the HTML output for reference is below. Note that the ext-discussiontools-init-section-bar element is only visible for users who have enabled the DiscussionTools beta feature, but it is always included in the HTML.
<h2 class="ext-discussiontools-init-section"> <span class="ext-discussiontools-init-section-subscribeButton ..." ...>...</span> <!-- Only included if topic subscription is enabled --> <span class="ext-discussiontools-init-section-subscribe mw-editsection-like">...</span> <!-- Only included if topic subscription is enabled --> <span class="mw-headline" ...> Heading text </span> <span class="mw-editsection">...</span> <div class="ext-discussiontools-init-section-bar"> ... </div> </h2>
<div class="mw-heading mw-heading2 ext-discussiontools-init-section"> <span class="ext-discussiontools-init-section-subscribeButton ..." ...>...</span> <!-- Only included if topic subscription is enabled --> <h2> <span class="ext-discussiontools-init-section-subscribe mw-editsection-like">...</span> <!-- Only included if topic subscription is enabled --> <span class="mw-headline" ...> Heading text </span> <span class="mw-editsection">...</span> </h2> <div class="ext-discussiontools-init-section-bar"> ... </div> </div>
Original bug report
I saw a link to https://www.mediawiki.org/wiki/Talk:Reading/Web/Desktop_Improvements#"Beginning"_is_confusing and browsed to it anonymously. For me, the current markup that DiscussionTools exposes for heading metadata is this:
<h2 class="ext-discussiontools-init-section"><!--__DTSUBSCRIBEBUTTONDESKTOP__h-Sdkb-2022-04-27T22:42:00.000Z--><!--__DTSUBSCRIBELINK__h-Sdkb-2022-04-27T22:42:00.000Z--><span id=".22Beginning.22_is_confusing"></span><span class="mw-headline" id=""Beginning"_is_confusing" data-mw-comment="{"type":"heading","level":0,"id":"h-\"Beginning\"_is_confusing-2022-04-27T22:42:00.000Z","replies":["c-Sdkb-2022-04-27T22:42:00.000Z-\"Beginning\"_is_confusing","c-132.170.199.112-2022-06-22T19:32:00.000Z-\"Beginning\"_is_confusing"],"headingLevel":2,"name":"h-Sdkb-2022-04-27T22:42:00.000Z"}"><span data-mw-comment-start="" id="h-"Beginning"_is_confusing-2022-04-27T22:42:00.000Z"></span>"Beginning" is confusing<span data-mw-comment-end="h-"Beginning"_is_confusing-2022-04-27T22:42:00.000Z"></span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Talk:Reading/Web/Desktop_Improvements&action=edit&section=11" title="Edit section: "Beginning" is confusing">edit</a><span class="mw-editsection-bracket">]</span></span><div class="ext-discussiontools-init-section-bar"><div class="ext-discussiontools-init-section-metadata"><span class="ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-timestampLabel">Latest comment: <a href="#c-OVasileva_(WMF)-2022-07-11T13:58:00.000Z-Sdkb-2022-07-06T17:16:00.000Z">26 days ago</a></span><span class="ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-commentCountLabel">9 comments</span><span class="ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-authorCountLabel">6 people in discussion</span></div><div class="ext-discussiontools-init-section-actions"><!--__DTSUBSCRIBEBUTTONMOBILE__h-Sdkb-2022-04-27T22:42:00.000Z--></div></div></h2>
Though you might not have known this, this markup makes it so every heading is being read out like this in assistive technologies:
"Beginning is confusing" [edit] Latest comment: 26 days ago 9 comments 6 people in discussion
While logged in at https://www.mediawiki.org/wiki/Talk:Reading/Web/Desktop_Improvements?dt-enable=1&safemode=1#"Beginning"_is_confusing it's even worse:
<h2 class="ext-discussiontools-init-section"><span class="ext-discussiontools-init-section-subscribeButton oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-labelElement oo-ui-flaggedElement-progressive oo-ui-buttonWidget" id="ooui-php-11" data-ooui="" data-mw-subscribed="null"><a class="oo-ui-buttonElement-button" role="button" title="Subscribe to receive notifications about new comments." tabindex="0" rel="nofollow"><span class="oo-ui-iconElement-icon oo-ui-icon-bellOutline oo-ui-image-progressive"></span><span class="oo-ui-labelElement-label">Subscribe</span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator oo-ui-image-progressive"></span></a></span><span class="ext-discussiontools-init-section-subscribe mw-editsection-like"><span class="ext-discussiontools-init-section-subscribe-bracket">[</span><a href="" class="ext-discussiontools-init-section-subscribe-link" role="button" tabindex="0" title="Subscribe to receive notifications about new comments.">subscribe</a><span class="ext-discussiontools-init-section-subscribe-bracket">]</span></span><span id=".22Beginning.22_is_confusing"></span><span class="mw-headline" id=""Beginning"_is_confusing" data-mw-comment="{"type":"heading","level":0,"id":"h-\"Beginning\"_is_confusing-2022-04-27T22:42:00.000Z","replies":["c-Sdkb-2022-04-27T22:42:00.000Z-\"Beginning\"_is_confusing","c-132.170.199.112-2022-06-22T19:32:00.000Z-\"Beginning\"_is_confusing"],"headingLevel":2,"name":"h-Sdkb-2022-04-27T22:42:00.000Z"}"><span data-mw-comment-start="" id="h-"Beginning"_is_confusing-2022-04-27T22:42:00.000Z"></span>"Beginning" is confusing<span data-mw-comment-end="h-"Beginning"_is_confusing-2022-04-27T22:42:00.000Z"></span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Talk:Reading/Web/Desktop_Improvements&action=edit&section=11" title="Edit section: "Beginning" is confusing">edit</a><span class="mw-editsection-bracket">]</span></span><div class="ext-discussiontools-init-section-bar"><div class="ext-discussiontools-init-section-metadata"><span class="ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-timestampLabel">Latest comment: <a href="#c-OVasileva_(WMF)-2022-07-11T13:58:00.000Z-Sdkb-2022-07-06T17:16:00.000Z">26 days ago</a></span><span class="ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-commentCountLabel">9 comments</span><span class="ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-authorCountLabel">6 people in discussion</span></div><div class="ext-discussiontools-init-section-actions"></div></div></h2>
which resolves to
Subscribe \"Beginning\" is confusing[edit] Latest comment: 26 days ago 9 comments 6 people in discussion
While some metadata might not seem as too much on one heading, it would certainly become a lot if every heading on the page is like this. Many users of assistive technologies use a list of headings to navigate the page, so they should be clear and concise (WCAG 2.1 criterion 2.4.6) about what each section represents. Usually, discussion authors try to keep them short and indicative of what a discussion is about. A bunch of metadata does not belong in every heading that would be exposed to assistive technologies. In addition, I was pointed by @Jack_who_built_the_house to MDN that says that heading elements are only supposed to have ‘Phrasing content’, which does not include <divs>.
If you want to make this a unified block, wrapping it in a <div> wrapper block instead would be better, as well as trying to fix whatever problems that have caused this usage in the first place. Abusing heading markup like this is a bad precedent.
This issue emerged in a conversation at en.wiki here: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#c-Whatamidoing_(WMF)-20220913225300-DiscussionTools_Beta_Feature_update .