Page MenuHomePhabricator

docs: Make code comments maximally inclusive
Open, Needs TriagePublic

Description

Background

Currently we're applying code formatting in inline comments sparesly and inconsistently.
In order to provide consistent and inclusive documentation with reduced cognitive load we should follow a particular style.

When comparing following different Markdown comments

  • An icon at the end of the textarea element. Similar to an ::after pseudo-element.
  • An icon at the end of the textarea element. Similar to an ::after pseudo-element.
  • An icon at the end of the <textarea> element. Similar to an ::after pseudo-element.

The third option is the clearest and most inclusive.

Why?

Clarity of Syntax

  • Markdown often supports HTML elements. Including the explicit <textarea> ensures clarity about the type of element involved.
  • This is particularly helpful for users with varying levels of expertise, as the <textarea> is a recognizable HTML tag.

Inclusivity Across Accessibility Needs

  • People using assistive technologies (e.g., screen readers) or those less familiar with programming terminology might not understand textarea without the angle brackets < >.
  • Specifying <textarea> aligns with common documentation practices, making it universally recognizable.

Reduces Ambiguity

  • Without the angle brackets, "textarea" could be misinterpreted as general text or another concept entirely, rather than a specific HTML element.
  • This distinction becomes crucial in international or beginner-friendly contexts.

Goal

Agree on above and apply uniform way to markup code (and HTML elements)

Acceptance criteria

  • All Codex pages have been unified to the agreed-on format

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly pointed to the codebase URL and provide clear steps to help a contributor get setup for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3

Hello, I wanted to know more about the task and its code set.

Do we only have or make changes in CHANGELOG.md to ensure HTML tags are distinguishable from normal text by wrapping them in backticks.?

Pppery added subscribers: Nischay3333, Pppery.

Resetting assignee since progress seems to have stalled

Change #1271744 had a related patch set uploaded (by Sanskritidubey; author: Sanskritidubey):

[design/codex@main] docs: Use angle brackets for HTML element references in comments

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

hey team
please review just submitted a patch :)