Problems with H-tags in Sharepoint

Søren Pontoppidan 1 Reputation point
2022-09-15T05:16:33.527+00:00

I have a question about the use of H-tags in Modern Sharepoint sites. When I use 'Overskrift 2' (danish version:-)) in the editor and then check the H-tag, it is tagged as a H3 in the browser. That is a bit confusing and not easy to make the site accesible according to the WCAG standards. Does anyone know how to solve this or is it a bug Microsoft needs to fix?

241264-image.png

241259-image.png

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,597 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Søren Pontoppidan 1 Reputation point
    2022-09-16T07:00:19.163+00:00

    Hi @RaytheonXie_MSFT . My example is from a communication site on a normal site page, and I use the text webpart. Here's another example. Can you see the problem or do you need more details?? : 241744-image.png


  2. Søren Pontoppidan 1 Reputation point
    2022-09-27T05:33:25.397+00:00

    Hi @RaytheonXie_MSFT sorry for my late answer. It is still a problem i guess. According to WCAG 2.1 you need to have a logical structure in your headings H1-H4: https://www.w3.org/WAI/tutorials/page-structure/headings/, and I think it's a problem that Sharepoints editor makes it more difficult with thier types of headings.

    So when I create a site page, and use the the tex webpart I should start with 'Title or H1' and then the next heading should be H2, but if I use header 2 in the editor it's registered as a H3. I can just use Header 1 in the editor but it's not logical for me or our editors:-).

    Can you see the problem, or do you need more info?

    0 comments No comments

  3. RaytheonXie_MSFT 35,066 Reputation points Microsoft Vendor
    2022-09-29T05:55:17.033+00:00

    Hi @Søren Pontoppidan
    In my case, I have the same structure with you. It's <h2> tag with heading1 and <h3> tag with heading2
    245810-image.png

    I feel regretful to inform you that it turns out to be a by-design one.

    And I noticed that some end users have also proposed the same request, it is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

  4. Søren Pontoppidan 1 Reputation point
    2022-09-29T07:17:45.177+00:00

    @RaytheonXie_MSFT thank you for the answer. I can't find the right post in the customers feedback. Can you guide me?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.