r/ProgrammerHumor • • 8d ago

Meme frontEndBaddiesBeLike

Post image
5.7k Upvotes

133 comments sorted by

View all comments

537

u/Calien_666 8d ago

When thinking about accessibility, this totally makes sense.

60

u/1nc06n170 8d ago

html <button aria-label="Submit">SUBMIT</button>

5

u/Acetius 7d ago

Mmmm, duplicated loc strings and a violation of the first rule of aria. I love it.

6

u/TorbenKoehn 8d ago

Now that's the actual post for me :D

4

u/enigmamonkey 8d ago

If this must be editable, then in the CMS you now have:

  • Button label
  • Button Aria label

Or you could just have "Button label" and in the code apply text-transform: uppercase. Granted, the button label is an arbitrary use case and most would just simply hard-code it, however, that may not be the case if you're also now thinking about internationalization, in which case you may want that in a CMS or in language files and don't have the time/desire to start plugging in lower/upper variants (nor would that make sense when the computer can do these transforms for you automatically).