-
Notifications
You must be signed in to change notification settings - Fork 55
feat(Header): addressing accessibility concerns and replacing subheader with description #17
Conversation
-restructured the DOM elements of the Header component
-added default value for the as property of the subheader -added texAlign example
…igin # Conflicts: # CHANGELOG.md # src/components/Header/Header.tsx
one thing that we might think about in addition - from a client's perspective it would be convenient to support the following way of declaring ...
<Header ... description='some description as plain string' /> where description is provided as a plain string. Currently the only way to provide description in this case is by using the explicit way of declaring the object: <Header ... description={{ content: '...' }} While I do understand that currently taken approach is consistent by the means of library design, it seems to be a too complex way for a client to provide description in the simplest situations. Probably, we could support first more declarartive way of providing |
Hi Roman, actually defining the description is possible with the proposed code, I guess just the examples are misleading that it is not supported. I will change the example for showing the description prop to be used as your proposal. Thanks for the catch! |
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
==========================================
+ Coverage 83.58% 84.34% +0.76%
==========================================
Files 59 59
Lines 804 792 -12
Branches 163 160 -3
==========================================
- Hits 672 668 -4
+ Misses 128 120 -8
Partials 4 4
Continue to review full report at Codecov.
|
Header
Addressing accessibility concerns and replacing the subheader prop with description. Previous discussions: stardust-ui/react-old#123
TODO