MediaWiki talk:Gadget-defaultVisibilityToggles.js

Latest comment: 10 months ago by Gradilion in topic Toggle button text

For earlier discussions, see MediaWiki talk:Gadget-visibilityToggling.js.

HQToggle inaccessible by keyboard edit

Links without href attribute cannot be focused by Tab key by default, see https://stackoverflow.com/questions/10510191/valid-to-use-a-anchor-tag-without-href-attribute. This means that people whose mouse is broken, or who are unable to use pointer devices due to some impairment are unable to view quotations. —JTojnar (talk) 16:18, 28 June 2020 (UTC)Reply

@JTojnar: I've added role="button" tabindex="0" to the a elements so that they can be focused with the tab key. Please let me know if there are any further problems. — Eru·tuon 18:46, 28 June 2020 (UTC)Reply
@Erutuon: Hmm, now I can focus it but looks like without href, Firefox will not trigger the click event. Will probably need to add href="#" and preventDefault to the event handler. —JTojnar (talk) 06:41, 29 June 2020 (UTC)Reply

CSS class edit

Discussion moved from MediaWiki talk:Gadget-VisibilityToggles.js#CSS class.

@Erutuon: When you've first implemented the recent changes, I voiced my issues with them at Wiktionary:Grease_pit/2022/March#Hiding_semantic_relations. One was swiftly addressed, the other one remains unsolved until today which is why I'm asking you again: Can you please make it so that the different buttons have different classes? As it stands, the nym toggle button and the quotations button both are of the class HQToggle which makes it impossible to hide one but not the other. — Fytcha T | L | C 22:49, 10 May 2022 (UTC)Reply

Makes sense. Synonyms and such will now have the nyms-toggle class. — Eru·tuon 00:58, 11 May 2022 (UTC)Reply
Thank you. — Fytcha T | L | C 01:18, 11 May 2022 (UTC)Reply
@Erutuon: “.nyms-toggle” needs to be added at MediaWiki:Common.css, lines 683, 2514, 2517, and 2521. J3133 (talk) 09:06, 11 May 2022 (UTC)Reply
@J3133: Thanks, done. — Eru·tuon 23:57, 11 May 2022 (UTC)Reply

Toggle button text edit

Hi there. I guess for declension tables, conjugation tables "show"/"hide" makes more sense than "more"/"less" as the toggle button text. So, what should be done? data-vs-showtext="show ▼" data-vs-showtext="hide ▲" for the .vsSwitcher element should be used? Maybe some general solution is possible? Gradilion (talk) 14:20, 16 June 2023 (UTC)Reply

Return to "Gadget-defaultVisibilityToggles.js" page.