[{"label":"Latest (1.0.0)","version":"latest"}]
crest

Heading Analysis

Description

This API uses machine learning models and inspects whether the text below each heading is related to the heading content or not. It covers the following Issue IDs:

Issue ID: cr_heading_unrelated

Definition

The content immediately following a heading identified by machine learning is possibly unrelated to the topic or purpose.

User Impact

Blind screen reader users rely on headings to navigate page content. When headings are misleading and do not reflect the topic or purpose, users can become disoriented and have difficulty navigating the page. Users with learning differences may also have difficulty understanding page content when headings are unrelated to content.

Recommendation

Provide clear and descriptive headings that accurately describe the immediatley following content.

Success Criterion

2.4.6 Headings and Labels (Level AA)

Related Success Criteria (if applicable):

1.3.1 Info and Relationships (Level A)

More details can be found at Understanding Success Criterion 2.4.6.

Request

Request

URL

URL


post
http://{api_host}/crest/api/operable/heading-analysis
Copy

Request Body

Request Body

request_body of mimetype application/json Required
Response

Response

Response Body

Response Body

200 OK

Returns HeadingAnalysisSuccessResponse of type application/json

The Success response contains categories that aggregate all the Error and Alert related issues.

{
	"categories": {
		"alert": {
			"count": 1,
			"description": "Alerts",
			"items": {
				"cr_heading_unrelated": {
					"count": 1,
					"description": "Possibly unrelated heading",
					"id": "cr_heading_unrelated",
					"level": "AA",
					"xpaths": [
						"/html[1]/body[1]/div[1]/a[1]"
					]
				}
			}
		}
	},
	"statistics": {
		"allitemcount": 1,
		"pageurl": "http://www.abc.com",
		"time": 5.13,
		"totalelements": 60
	},
	"status": {
		"httpstatuscode": 200,
		"success": "True"
	}
}
Errors

Errors

failure_response
400

Bad Request, missing something, or the request body wasn’t correct.

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"reporttype":3,"url":"http://www.abc.com"}' http://{api_host}/crest/api/operable/heading-analysis


[{"label":"Latest (1.0.0)","version":"latest"}]
crest
Feedback

Was this page helpful?