Skip to content
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

Accessibility Pod Title prop always shown H4 #4607

Closed
1 task done
ibsenjg opened this issue Nov 30, 2021 · 7 comments · Fixed by #6246
Closed
1 task done

Accessibility Pod Title prop always shown H4 #4607

ibsenjg opened this issue Nov 30, 2021 · 7 comments · Fixed by #6246

Comments

@ibsenjg
Copy link

ibsenjg commented Nov 30, 2021

Desired behaviour

Be able to use a similar prop as "as" present in typography to modify the rendered title element to solve Accessibility issues coming from SBS-24478

Current behaviour

Always returning an H4 element besides his internal rendered node which may be even an H3, H2.

Suggested Solution

No response

CodeSandbox or Storybook URL

https://carbon.sage.com/iframe.html?id=pod--default-story&viewMode=docs#pod-1

Anything else we should know?

SBS-24478

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@nicktitchmarsh
Copy link
Contributor

FE-4493

@nicktitchmarsh nicktitchmarsh added On Backlog Design System Review Required DS team to review changes triage Triage Required and removed triage Triage Required labels Dec 1, 2021
@nicktitchmarsh
Copy link
Contributor

Design system to clarify if they want Pod to have different title weights above H4. Or if content designers should be discouraged from putting higher heading tags in the body of a Pod

@samtjo
Copy link
Contributor

samtjo commented Feb 22, 2022

@nicktitchmarsh have you heard anymore about this?

@nicktitchmarsh
Copy link
Contributor

I had added to the JIRA ticket a possible solution of allowing title and subtitle to be passed as a React node instead of rendering into the provided Heading tags

@samtjo samtjo added the pod label Mar 29, 2022
@samtjo
Copy link
Contributor

samtjo commented Apr 12, 2022

Does that mean we can remove the triage label and do this ticket then @nicktitchmarsh or do we still need DS input as well?

@edleeks87 edleeks87 removed the triage Triage Required label Apr 26, 2022
@nicktitchmarsh nicktitchmarsh removed the Design System Review Required DS team to review changes label Aug 4, 2022
tomdavies73 added a commit that referenced this issue Aug 9, 2023
surfaces the `headingType` prop on the component to provide consumers with the ability to specify
which level of section headings they wish to apply from h1 to h5 when the `title` prop is a string.
Also conditional rendering is now used to ensure when `title` is passed as a node it is not wrapped
in any other section headings

fix #4607
tomdavies73 added a commit that referenced this issue Aug 10, 2023
surfaces the `headingType` prop on the component to provide consumers with the ability to specify
which level of section headings they wish to apply from h1 to h5 when the `title` prop is a string.
Also conditional rendering is now used to ensure when `title` is passed as a node it is not wrapped
in any other section headings

fix #4607
tomdavies73 added a commit that referenced this issue Aug 10, 2023
the `title` and `subtitle` props can now be passed as a node, providing consumers with the ability
to pass components such as `Typography` to control what element is rendered and its appearance.
Also, conditional rendering has been used to ensure when `title` is passed as a node is not wrapped
in any other section headings

fix #4607
tomdavies73 added a commit that referenced this issue Aug 11, 2023
the `title` and `subtitle` props can now be passed as a node, providing consumers with the ability
to pass components such as `Typography` to control what element is rendered and its appearance.
Also, conditional rendering has been used to ensure when `title` is passed as a node is not wrapped
in any other section headings

fix #4607
@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. If you believe this issue is still valid and required please comment below. It will be reviewed by the core Carbon team and may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 12, 2023
carbonci pushed a commit that referenced this issue Aug 21, 2023
## [119.12.0](v119.11.0...v119.12.0) (2023-08-21)

### Features

* **pod:** allow title and subtitle to be passed as a node ([efdc827](efdc827)), closes [#4607](#4607)
@carbonci
Copy link
Collaborator

🎉 This issue has been resolved in version 119.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants