Automated checking for programmatic and stylistic errors
npm install eslint
https://eslint.org/docs/rules
npm install stylelint
https://stylelint.io/user-guide/rules
Accessibility Testing
https://pa11y.org
Web Content Accessibility Guidelines WCAG
https://www.w3.org/WAI/standards-guidelines/wcag
A - Minimum, mostly accessible but not convenient
AA - General standard, balance of ease of use & development
AAA - Highest standard, sites for persons with disabilities
https://pa11y.org
npm install pa11y
"code": "WCAG2AA.Principle1.Guideline1_1.1_1_1.H37",
"type": "error",
"typeCode": 1,
"message": "Img element missing an alt attribute. Use the alt attribute to specify a short text alternative.",
"context": "<img src="\"/img/hacktoberfest.png\"">",
"selector": "html > body > main > article > article:nth-child(1) > img",
"runner": "htmlcs",
"runnerExtras": {}
"code": "WCAG2AA.Principle1.Guideline1_1.1_1_1.H37",
"message": "Img element missing an alt attribute. Use the alt attribute to specify a short text alternative.",
"context": "<img src="\"/img/hacktoberfest.png\"">",
"selector": "html > body > main > article > article:nth-child(1) > img",
"context": "<img src="\"/img/hacktoberfest.png\"">",
"selector": "html > body > main > article > article:nth-child(1) > img"
"code": "wcag2aa.principle1.guideline1_1.1_1_1.h37",
"message": "img element missing an alt attribute. use the alt attribute to specify a short text alternative.",
describe(`Blog Homepage`, () => {
before(() => {
cy.visit(`http://my-testing-blog.local`);
});
it(`Contains "My Testing Blog" in the title`, () => {
cy.title().should(`contain`, `My Testing Blog`);
});
});
// Name of Test
describe('Blog Homepage', () => {
// Runs at the start of this test
before(() => {
// Visit our website in the Cypress browser
cy.visit('http://my-testing-blog.local')
})
// Assertion - title should contain specific text
it('contains "My Testing Blog" in the title', () => {
cy.title().should('contain', 'My Testing Blog')
})
})