src/applications/_mock-form-ae-design-patterns/vadx/utils/HeadingHierarchyAnalyzer.js
Function findHeadingIssues
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static findHeadingIssues(headings) {
const issues = [];
// Check for missing h1
if (!headings.some(h => h.level === 1)) {
Function collectHeadings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
collectHeadings(element, pathPrefix = '') {
const headings = [];
// Process DOM element and add headings to the array when found
const processElement = (el, path) => {
Function processElement
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const processElement = (el, path) => {
// Check if element is a heading
if (el?.matches?.('h1, h2, h3, h4, h5, h6')) {
headings.push({
text: el.textContent.trim(),