Merge HeaderButtons.tsx
and RoomHeaderButtons.tsx
#25036
Labels
A-Room-View
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Tolerable
Low/no impact on users
T-Enhancement
Your use case
What would you like to do?
I would like to see
HeaderButtons.tsx
andRoomHeaderButtons.tsx
merged, if they essentially do the same thing.Why would you like to do it?
There are several components which seem to be related to display buttons on the room header:
RoomHeader
,RoomHeaderButtons
,HeaderButtons
, andHeaderButton
.Currently
HeaderButton
andHeaderButtons
are used onRoomHeaderButtons.tsx
only, and sinceRoomHeaderButtons
is used onRoomHeader.tsx
only, it means that there is a simple hierarchy as below:HeaderButtons
has been used to render buttons which display content insideBaseCard
if they are clicked, for example, pinned message card, a thread, and a room information card, which I think is because those buttonsarewere tagged with ARIAtab
role instead ofbutton
(thetab
role had been in fact not effective, because there was not an associated element tagged withtabpanel
. Please see here for more information: #25016).Because
HeaderButtons
are used only on the room header, it should be fine to mergeHeaderButtons.tsx
withRoomHeaderButtons.tsx
to simplify the structure such as below:Now the the ARIA "tablist" role has been removed from
HeaderButtons
by matrix-org/matrix-react-sdk#10628, there is no point of keepingHeaderButtons
besidesRoomHeaderButtons
, unless there would be something like "SpaceHeader".How would you like to achieve it?
Have you considered any alternatives?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: