Wikipedia:Bots/Requests for approval/IznoBot 3
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was Approved.
Operator: Izno (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 01:21, Tuesday, February 23, 2021 (UTC)
Automatic, Supervised, or Manual: supervised
Programming language(s): AutoWikiBrowser
Source code available: AWB
Function overview: Make NavFrame uses accessible in user-space
Links to relevant discussions (where appropriate): Wikipedia:NavFrame, MediaWiki talk:Common.css/to do#NavFrame
Edit period(s): one time run
Estimated number of pages affected: 2400 or less
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: Two changes will be made:
- Find
NavFrame
, replace withNavFrame collapsed
- Find
display *: *none *;?
, replace with the empty string - A possible third action: remove empty style attributes. This would probably not occur very often.
Background:
WP:NavFrame has been deprecated for a long time. I've recently taken up the cause (again, I spent some time on templates a year or two ago) of removing its uses, either via replacement with a collapsible template or raw mw-collapsible
and friends. Outside the project spaces externally visible (e.g. portal, template, module), a perfect solution probably isn't called for.
What I'd like to do is update user pages particularly to be marginally more accessible by applying the above changes.
At some point, after all article space uses are fixed (I'm not going to fix talk spaces and I've covered the other spaces where necessary pending about 120 individual pages), NavFrame would be removed from Common.css and Common.js. This would cause remaining pages everywhere (user space, article space, talk spaces, etc.) to display uncollapsed and users could elect to update their pages on their own time if they were interested in continuing to have collapsed content, either by using an existing template or migrating to mw-collapsible.
Possible alternatives to this task:
- Remove the divs entirely. I basically see that change as unnecessarily disruptive to the displayed page in all likelihood, so I'm not interested in implementing this solution.
- Move users from one system to one of the approved ones with pixel-perfection. This is something beyond my skill to perform near-automatically, though I'm sure a more-skilled bot coder could handle it, so I'm not interested in implementing this solution. (I.e. it's fundamentally a pain in the neck. I'm not looking forward to working on the 4k uses in mainspace with whichever solution I pick for there. Likely total removal given WP:MOSCOLLAPSE.)
- Simply swap the relevant classes for their
mw-collapsible
alternatives (and remove the NavHead class). This would change some colors and borders, and the interaction with the toggle element would be slightly "jumpy" for the end user. I have no problem implementing this solution if it is preferable to the later possible disruption when NavFrame is removed entirely.
--Izno (talk) 01:24, 23 February 2021 (UTC)[reply]
Discussion
- Forgive my potential ignorance, but could you give us an example edit to show how the change will make user pages more accessible? I'm all for removing deprecated templates and CSS in principle however. ƒirefly ( t · c ) 12:43, 23 February 2021 (UTC)[reply]
- Setting CSS to display: none hides it for everyone, even if you mean for the content to be available to some people via JavaScript. That means that people without JavaScript (screen readers, those who turn it off) cannot see the content in the NavFrame divs that have display: none. --Izno (talk) 16:43, 23 February 2021 (UTC)[reply]
- Ah yes, my apologies, for some reason known only to past-me I read the task as adding
display:none
, which is why I got confused. Personally I think it'd be better to do this in one go, just swapping all the old-and-busted CSS for the new-hotness ofmw-collapsible
. I can have a look at finding a solution for the 'jumpy interaction' problem if you wish? Even without that fix, I would support just swapping out the old for the new in userspace and being done with it. ƒirefly ( t · c ) 17:28, 23 February 2021 (UTC)[reply]- The jumpy interaction is a solved problem give or take (add a div inside the 'title' div with margin-right of 4em if the text of the title div is aligned left or right, margin-left/right of 4 em if centered), it's just a pain to find the content that you might want to do that to because of the conditional on the style of the surrounding element. --Izno (talk) 17:39, 23 February 2021 (UTC)[reply]
- Ah yes, my apologies, for some reason known only to past-me I read the task as adding
- Setting CSS to display: none hides it for everyone, even if you mean for the content to be available to some people via JavaScript. That means that people without JavaScript (screen readers, those who turn it off) cannot see the content in the NavFrame divs that have display: none. --Izno (talk) 16:43, 23 February 2021 (UTC)[reply]
- About 450 of those search results were .css or .js pages, which should be excluded. So that leaves about 1350 pages. -- WOSlinker (talk) 22:48, 23 February 2021 (UTC)[reply]
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Seems reasonable to me. At first the #3 alternative sounds better but it could have visual consequences, as you say. Better to leave those design decisions to the user. Overall I think your proposal is the least disruptive, even if it means some end up with uncollapsed content once NavFrame is removed. Do be careful to make sure the
display *: *none *;?
bit is the same element as the one usingNavFrame
, though. I also suggest adding a note about the deprecation in the edit summary, that way users who spot your edits can get a head start on fixing their userpage if they so desire. — MusikAnimal talk 21:37, 4 March 2021 (UTC)[reply]- Trial complete.. I bumped into some surprises that I'll take care of by mainly-manual fix in AWB (mostly rejecting certain changes or hitting the skip button):
- 49ersBelongInSanFrancisco does not have display: none in his NavContent. Hit skip on that page, but some users have this elsewhere which had the relevant change rejected (i.e. they have multiple cases of NavFrame and not all are collapsed).
- User:0fret/sandbox is a sandbox. Skipped the page but there's not much I can do about that.
- [1] also was manual after the initial AWB suggested change.
- Also left a note at WT:AWB that seems to indicate that subrules don't work right now...
- --Izno (talk) 03:29, 5 March 2021 (UTC)[reply]
- Trial complete.. I bumped into some surprises that I'll take care of by mainly-manual fix in AWB (mostly rejecting certain changes or hitting the skip button):
- Maybe skip those without style immediately after NavContent and then look at those in a little more detail as a second run? There are: with NavContent then style - 2294 and with NavContent but not followed by style - 67. -- WOSlinker (talk) 09:16, 5 March 2021 (UTC)[reply]
- Approved. I spot checked the other edits and they look good to me. This task is supervised, so I'm not that concerned given you're skipping or manually fixing the outliers. Thanks for making Wikipedia more accessible! — MusikAnimal talk 16:35, 5 March 2021 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard.