mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.18k stars 501 forks source link

What's wrong with "required"? Is it invalid? Is it deprecated? #8086

Open peterbe opened 1 year ago

peterbe commented 1 year ago

Summary

I arrive on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required and it highlights the relevant page in the left side-bar:

Screenshot 2023-01-30 at 2 06 09 PM-with-shadow

But my impression, with that red is that it means that required is "bad" or "dangerous" or something.

URL

Any page https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

Reproduction steps

  1. View a page where the attribute is highlighted in the sidebar
  2. Be shocked and confused :)

Expected behavior

Some other way to highlight which page I'm currently on.

Actual behavior

The same style as for dangerous things. E.g.

Screenshot 2023-01-30 at 2 07 35 PM-with-shadow

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Android

Screenshot

Pasted above.

Anything else?

No response

Validations

caugner commented 1 year ago

Thanks for flagging this, Peter. đź‘‹

I'll note here:

  1. The highlight color in the left sidebar is consistent with the highlight color in the TOC on the right: image
  2. The color depends on the section, and while the HTML section uses red, the CSS section uses blue: image

However, even though the design (of the TOC) and those colors were intentionally chosen by our designer in early 2022, I agree that it is misleading in the HTML section, because the highlight in the sidebar/TOC looks exactly like the warning notecards/callouts (even if it uses a slightly different color).

So I'll add this to the backlog of issues to be looked at by our UX designer.

peterbe commented 1 year ago

Hi Claas, As you can probably tell, I'm playing devils advocate. I'm aware of that (strange) design decision :) I just got the inclination to raise my voice in hope that it helps, for everyone's sake. Keep up the good work!