[go: up one dir, main page]

Page MenuHomePhabricator

Metadata and buttons should be inserted after a heading, not inside of it
Closed, ResolvedPublicBUG REPORT

Description

Deployment plan

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.

BEFORE
<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>
AFTER
<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="&quot;Beginning&quot;_is_confusing" data-mw-comment="{&quot;type&quot;:&quot;heading&quot;,&quot;level&quot;:0,&quot;id&quot;:&quot;h-\&quot;Beginning\&quot;_is_confusing-2022-04-27T22:42:00.000Z&quot;,&quot;replies&quot;:[&quot;c-Sdkb-2022-04-27T22:42:00.000Z-\&quot;Beginning\&quot;_is_confusing&quot;,&quot;c-132.170.199.112-2022-06-22T19:32:00.000Z-\&quot;Beginning\&quot;_is_confusing&quot;],&quot;headingLevel&quot;:2,&quot;name&quot;:&quot;h-Sdkb-2022-04-27T22:42:00.000Z&quot;}"><span data-mw-comment-start="" id="h-&quot;Beginning&quot;_is_confusing-2022-04-27T22:42:00.000Z"></span>"Beginning" is confusing<span data-mw-comment-end="h-&quot;Beginning&quot;_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&amp;action=edit&amp;section=11" title="Edit section: &quot;Beginning&quot; 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="&quot;Beginning&quot;_is_confusing" data-mw-comment="{&quot;type&quot;:&quot;heading&quot;,&quot;level&quot;:0,&quot;id&quot;:&quot;h-\&quot;Beginning\&quot;_is_confusing-2022-04-27T22:42:00.000Z&quot;,&quot;replies&quot;:[&quot;c-Sdkb-2022-04-27T22:42:00.000Z-\&quot;Beginning\&quot;_is_confusing&quot;,&quot;c-132.170.199.112-2022-06-22T19:32:00.000Z-\&quot;Beginning\&quot;_is_confusing&quot;],&quot;headingLevel&quot;:2,&quot;name&quot;:&quot;h-Sdkb-2022-04-27T22:42:00.000Z&quot;}"><span data-mw-comment-start="" id="h-&quot;Beginning&quot;_is_confusing-2022-04-27T22:42:00.000Z"></span>"Beginning" is confusing<span data-mw-comment-end="h-&quot;Beginning&quot;_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&amp;action=edit&amp;section=11" title="Edit section: &quot;Beginning&quot; 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 .

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Mentioned in SAL (#wikimedia-operations) [2022-11-14T14:14:44Z] <taavi@deploy1002> taavi and matmarex: Backport for [[gerrit:856550|Use legacy DiscussionTools heading markup except on beta cluster (T314714)]], [[gerrit:855744|ThreadItemStore: Handle race conditions when finding/inserting outside of transaction (T322701)]], [[gerrit:855745|persistRevisionThreadItems: Print time taken]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmn

Mentioned in SAL (#wikimedia-operations) [2022-11-14T14:20:39Z] <taavi@deploy1002> Finished scap: Backport for [[gerrit:856550|Use legacy DiscussionTools heading markup except on beta cluster (T314714)]], [[gerrit:855744|ThreadItemStore: Handle race conditions when finding/inserting outside of transaction (T322701)]], [[gerrit:855745|persistRevisionThreadItems: Print time taken]] (duration: 06m 14s)

Change 843596 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Move visualenhancements metadata and some buttons outside of `<h2>`

https://gerrit.wikimedia.org/r/843596

You can probably tell what my plan for rolling this out is from the patches above. I'll consult the timing with the team and post some notifications on the wikis before I proceed, probably next week.

Change 856960 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Remove 'DiscussionToolsLegacyHeadingMarkup' config option

https://gerrit.wikimedia.org/r/856960

I was asked not to deploy anything to enwiki while they're angry at the WMF, so I guess I need a different plan.

If anyone watching this task would like to volunteer their site to receive this change first, and then review gadgets, site styles etc. for any problems, I would be grateful.

Is this in reference to entire DT mobile experience or just this task? Because it would be weird if it’s the latter.

while they're angry at the WMF

Lol, when are they not ?

Is this in reference to entire DT mobile experience or just this task? Because it would be weird if it’s the latter.

Just this task. We're being weirdly careful because gadgets and stuff tend to depend on things like these, and it's problematic to revert the change once if has been enabled (the new version gets cached).

Lol, when are they not ?

I have also wondered why folks being angry at someone else in my organization trying to push an unpopular decision would mean that I can't do things, but such is life, I guess.

Just this task. We're being weirdly careful because gadgets and stuff tend to depend on things like these, and it's problematic to revert the change once if has been enabled (the new version gets cached).

So the fact that someone is mad at the WMF in English Wikipedia means that a future default feature would be rolled out in a bad state. Tragic.

*shrug* We'll get to a good state eventually. Also, quite optimistic of you to assume that we'll roll it out that soon ;)

Next steps

  • @matmarex to announce change on pl.wiki sometime this week
  • @matmarex to backport this change to pl.wiki on Tuesday, 29 Nov
  • @ppelberg to file meta-task for deployment plan. Something like the below...
    • Phase 1: pl.wiki
    • Phase 2: nearly all wikis
    • Phase 3: big wikis (e.g en.wiki, de.wiki, fr.wiki, etc.)

Change 856551 merged by jenkins-bot:

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on plwiki

https://gerrit.wikimedia.org/r/856551

Mentioned in SAL (#wikimedia-operations) [2022-11-29T21:34:57Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:856551|Use new DiscussionTools heading markup on plwiki (T314714)]]

Mentioned in SAL (#wikimedia-operations) [2022-11-29T21:36:03Z] <urbanecm@deploy1002> urbanecm and matmarex: Backport for [[gerrit:856551|Use new DiscussionTools heading markup on plwiki (T314714)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-11-29T21:42:00Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:856551|Use new DiscussionTools heading markup on plwiki (T314714)]] (duration: 07m 02s)

Mentioned in SAL (#wikimedia-operations) [2022-11-29T21:46:03Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:856551|Use new DiscussionTools heading markup on plwiki (T314714)]]

Mentioned in SAL (#wikimedia-operations) [2022-11-29T21:51:18Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:856551|Use new DiscussionTools heading markup on plwiki (T314714)]] (duration: 05m 15s)

Next steps

  • @ppelberg to add specifics about the following phases to task description
    • Today (5-Dec): Group 0
    • Thursday (8-Dec): Group 1
    • TBD: Group 2 minus en.wiki
    • TBD: en.wiki

Change 856552 merged by jenkins-bot:

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on group0 wikis

https://gerrit.wikimedia.org/r/856552

Mentioned in SAL (#wikimedia-operations) [2022-12-05T21:07:07Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:856552|Use new DiscussionTools heading markup on group0 wikis (T314714)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-05T21:08:50Z] <samtar@deploy1002> samtar and matmarex: Backport for [[gerrit:856552|Use new DiscussionTools heading markup on group0 wikis (T314714)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-12-05T21:17:03Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:856552|Use new DiscussionTools heading markup on group0 wikis (T314714)]] (duration: 09m 55s)

ppelberg updated the task description. (Show Details)

Change 874855 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on group1 wikis

https://gerrit.wikimedia.org/r/874855

Change 874855 merged by jenkins-bot:

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on group1 wikis

https://gerrit.wikimedia.org/r/874855

Mentioned in SAL (#wikimedia-operations) [2023-01-03T21:34:01Z] <taavi@deploy1002> Started scap: Backport for [[gerrit:869226|Specify Citoid RESTBase URL separately (T325425)]], [[gerrit:874855|Use new DiscussionTools heading markup on group1 wikis (T314714)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-03T21:35:51Z] <taavi@deploy1002> taavi and matmarex: Backport for [[gerrit:869226|Specify Citoid RESTBase URL separately (T325425)]], [[gerrit:874855|Use new DiscussionTools heading markup on group1 wikis (T314714)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-03T21:46:13Z] <taavi@deploy1002> Finished scap: Backport for [[gerrit:869226|Specify Citoid RESTBase URL separately (T325425)]], [[gerrit:874855|Use new DiscussionTools heading markup on group1 wikis (T314714)]] (duration: 12m 12s)

Change 878168 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on group2 wikis except enwiki

https://gerrit.wikimedia.org/r/878168

Change 878169 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on enwiki

https://gerrit.wikimedia.org/r/878169

We haven't noticed any issues or heard any complaints about last week's deployment, so we're going to continue with the remaining wikis.

@Jack_who_built_the_house Thanks for updating ConvenientDiscussions (T314714#8504003), I hope that wasn't too big of an annoyance. If you know of other gadgets that required fixes, I'd be curious to see them.

Change 878168 merged by jenkins-bot:

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on group2 wikis except enwiki

https://gerrit.wikimedia.org/r/878168

Mentioned in SAL (#wikimedia-operations) [2023-01-10T21:08:03Z] <zabe@deploy1002> Started scap: Backport for [[gerrit:878168|Use new DiscussionTools heading markup on group2 wikis except enwiki (T314714)]], [[gerrit:878187|Start reading from cul_actor on group1 wikis (T233004)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-10T21:09:51Z] <zabe@deploy1002> zabe and zabe and matmarex: Backport for [[gerrit:878168|Use new DiscussionTools heading markup on group2 wikis except enwiki (T314714)]], [[gerrit:878187|Start reading from cul_actor on group1 wikis (T233004)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-10T21:18:11Z] <zabe@deploy1002> Finished scap: Backport for [[gerrit:878168|Use new DiscussionTools heading markup on group2 wikis except enwiki (T314714)]], [[gerrit:878187|Start reading from cul_actor on group1 wikis (T233004)]] (duration: 10m 08s)

Change 878169 merged by jenkins-bot:

[operations/mediawiki-config@master] Use new DiscussionTools heading markup on enwiki

https://gerrit.wikimedia.org/r/878169

Mentioned in SAL (#wikimedia-operations) [2023-01-17T18:23:01Z] <zabe@deploy1002> Started scap: Backport for [[gerrit:880908|objectcache: Fix DI for MultiWriteBagOStuff sub caches (T327158)]], [[gerrit:878169|Use new DiscussionTools heading markup on enwiki (T314714)]], [[gerrit:879158|Add "Clear Affordances" to DiscussionTools beta feature on remaining wikis (T321955)]], [[gerrit:879159|Add "Page Frame" to DiscussionTools beta feature on partner wikis (T317907)]], [[gerrit:879103|

Mentioned in SAL (#wikimedia-operations) [2023-01-17T18:25:06Z] <zabe@deploy1002> zabe and matmarex and zabe: Backport for [[gerrit:880908|objectcache: Fix DI for MultiWriteBagOStuff sub caches (T327158)]], [[gerrit:878169|Use new DiscussionTools heading markup on enwiki (T314714)]], [[gerrit:879158|Add "Clear Affordances" to DiscussionTools beta feature on remaining wikis (T321955)]], [[gerrit:879159|Add "Page Frame" to DiscussionTools beta feature on partner wikis (T317907)]], [[

Now deployed everywhere. I hope the enwiki deployment will be as uneventful as the previous ones.

Last step will be to remove the code for the unused config option (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/856960), once we're sure we won't need to revert this.

Hopefully this won’t be confused with today’s/tomorrow’s ‘new Vector becomes the default skin in enWP’ deployment :-)

A bit unfortunate timing (I didn't know when that was planned for), but I am hoping that almost no one even notices this change. And if we were to wait until no one else at WMF is doing anything, we'd never get our turn… (I mean, waiting like that is why this change is happening now, it should have been finished a month ago).

I noticed on mediawiki.org that the lines of headings run into the margin of floating elements again. It seems overflow:hidden was removed ? Is this known and desirable ? The ticket to fix that behavior was pretty long back in the day.

I noticed on mediawiki.org that the lines of headings run into the margin of floating elements again. It seems overflow:hidden was removed ? Is this known and desirable ? The ticket to fix that behavior was pretty long back in the day.

Thank you, not known and not desirable. I guess it's rare enough that it didn't come up in testing of this change, but we've had bug reports about this before and fixed them: T318872: Subscribe buttons/links are displayed out of place when next to floating elements on Timeless. I'll file a separate task.

Change 881925 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/Graph@master] Update mw-graph-shared to latests version

https://gerrit.wikimedia.org/r/881925

Sorry about that patch. Copied phab id from the wrong window ;)

Change 856960 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Remove 'DiscussionToolsLegacyHeadingMarkup' config option

https://gerrit.wikimedia.org/r/856960

ppelberg awarded a token.

Test wiki on Patch demo by Matma Rex using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/3c215ff3e5/w/