-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(icon): Add docs for inline icon #10348
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
Conversation
src/lib/icon/icon.md
Outdated
| 2. **Interactive**: a user will click or otherwise interact with the icon to perform some action. | ||
| 3. **Indicator**: the icon is not interactive, but it conveys some information, such as a status. | ||
|
|
||
| 4. **Inline**: the icon is not interactive and is inlined into a block of text to convey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to add a fourth category, since it makes it seem more complicated overall. I think we could do:
3. **Indicator**: the icon is not interactive, but it conveys some information, such as a status. This
includes using the icon in place of text inside of a larger message.
src/lib/icon/icon.md
Outdated
| ``` | ||
|
|
||
| #### Decorative icons | ||
| When the icon is puely cosmetic and conveys no real semantic meaning, the `<mat-icon>` element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puely » purely
| #### Indicator icons/Inline icons | ||
| When the presence of an icon communicates some information to the user whether as an indicator or | ||
| by being inlined into a block of text, that information must also be made available to | ||
| screen-readers. The most straightforward way to do this is to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
screen-readers » screen readers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving as screen-readers as this is the choice used throughout the library.
| information as the icon. | ||
| 3. Add the `cdk-visually-hidden` class to the `<span>`. This will make the message invisible | ||
| 2. Add the `cdk-visually-hidden` class to the `<span>`. This will make the message invisible | ||
| on-screen but still available to screen-reader users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
screen-reader » screen reader
6c9ddf1 to
3fb24dc
Compare
f3e3a6d to
7f086c6
Compare
|
@jelbourn when you can, PTAL. |
src/lib/icon/icon.md
Outdated
| be made available to screen-readers. The most straightforward way to do this is to | ||
| 1. Mark the `<mat-icon>` as `aria-hidden="true"` | ||
| 2. Add a `<span>` as an adjacent sibling to the `<mat-icon>` element with text that conveys the same | ||
| #### Indicator icons/Inline icons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this as just "Indicator icons" since we're still using that above?
7f086c6 to
53481a4
Compare
jelbourn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.