-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button text shouldn't be uppercase #2187
Comments
Material design has uppercase button text by default: https://m2.material.io/components/buttons It's not uppercase in daisyUI by default. // tailwind.config.js
module.exports = {
plugins: [require('daisyui')],
daisyui: {
themes: [
{
light: {
...require("daisyui/src/theming/themes")["[data-theme=light]"],
"--btn-text-case": "none",
},
},
],
},
} |
Material Design dropped uppercase buttons: https://m3.material.io/components/all-buttons As for MUI it is based on old Material Design v2 guidelines: new v6 will be based on Material Design v3 guidelines. |
I didn't know that. However I don't see any reasons to drop the uppercase for the built-in default theme. It's easy to change the CSS variable if you don't like the uppercase |
Defaults should be carefully considered: they should embody the best practices (mainly accessibility here) and not the author's personal preferences. It's not a question of "easy to change if you don't like uppercase". Beside uppercase buttons, borderless inputs by default is also bad. https://coyleandrew.medium.com/form-design-best-practices-9525c321d759#5759 Others don't do that: Bootstrap, Mantine, MUI BaseUI, MUI JoyUI, Spectrum, Chakra, Ant Design, PrimeReact, Bulma, standard HTML, Qt/KDE, GNOME/GTK+, Apple, Microsoft... When there is a consensus you need strong reasons not to follow them. |
I think I should make something clear here. The built-in default themes only exist as a starting point to see how each component would look like with different colors and styles. I even made a theme generator page to encourage developers to make their own theme with custom colors and styles. The uppercase text was not a random decision. It was already being used in Material design (used in various Google products and almost every Android) The advantage of uppercase is gaining more attention for the buttons and makes it more obvious that it's an ACTION BUTTON. It is loud but I don't see any downside. If there's a downside of having uppercase text for buttons, please let me know. About inputs, it's important to make it obvious. It can be using borders or other design decisions. The article you mentioned is about forms. There are other ways to make an input obvious for example an icon, a placeholder text and a search button would make it obvious where is a search input. Design best practices are not absolute. |
That wouldn't be a correct. The default is the bare minimum style of a component which can be modifier with modifier class names or Tailwind's utility classes. It makes more sense if the default is without border and we use a modifier class name to add something (border) to it, that using a modifier class name to remove something from it. |
https://material.angular.io/components/button/overview#capitalization "[capitalizing] buttons [...] can cause issues in certain locales. [Also] using ALL CAPS in the text itself causes issues for screen-readers, which will read the text character-by-character" when they say "According to the Material design spec" they are referring to the old spec - v2 instead of v3 |
If I'm going to do this change, I need more info? Which locales?
I haven't seen this issue with screen readers. Which screen reader software? |
Couldn't find any details Found these interesting comments that recaps all issues with ALL CAPS:
Found this in Angular Material repo (nothing new :-/): |
From a technical point of vue, yes it feels satisfying and clean. However not from the user (accessibility) point of vue given the Google study. <input class="input" /> // Bordered by default
<input class="input-borderless" />
<textarea class="textarea"></textarea> // Bordered by default
<textarea class="textarea-borderless"></textarea>
<select class="select"></select> // Bordered by default
<select class="select-borderless"></select> btw, Tailwind already features |
Button text shouldn't be uppercase (at least by default)
https://daisyui.com/components/button/
Google (Chrome, web), Amazon, Microsoft (Windows, web), GitHub, Apple (iOS, macOS, web), Android, Facebook, KDE/Qt, GNOME... don't do that
Other web UI libs don't do that: Bootstrap, Mantine, MUI BaseUI, Spectrum, Chakra, Ant Design, PrimeReact, Grommet, Bulma, standard HTML...
Old Google Material (m2) did use uppercase buttons (and so old MUI).
This is not the case anymore: https://m3.material.io/components/all-buttons
Without uppercase (padding should be reduced btw):
Also this makes
btn-link
inconsistent withlink
:vs
The text was updated successfully, but these errors were encountered: