System and method for contingency-table-driven web UI component pattern resolution for accessibility testing
The method and system for resolving conflicting user-interface (UI) component classifications for accessibility testing are presented. The method includes determining, for a rendered user-interface component in a document object model (DOM), a component root for a candidate UI element using a tight-ancestor DOM traversal; generating, using a trained visual-pattern detection model operating on rendered pixel data, a visual-pattern label for the candidate UI element; generating, for the candidate UI element, a semantic-pattern label using a semantic classification engine that evaluates at least accessibility metadata; executing a machine-implemented resolution logic that evaluates the visual-pattern label and the semantic-pattern label of the candidate UI element to determine an appropriate resolution action for the candidate UI element; and when the resolution logic determines that a definitive behavioral pattern can be assigned to the candidate UI element, executing an accessibility test suite selected according to the definitive behavioral pattern.
1 . A method for resolving conflicting user-interface (UI) component classifications for accessibility testing comprising:
determining, for a rendered user-interface component in a document object model (DOM), a component root for a candidate UI element using a tight-ancestor DOM traversal;
generating, using a trained visual-pattern detection model operating on rendered pixel data, a visual-pattern label for the component root;
generating, for the candidate UI element, a semantic-pattern label using a semantic classification engine that evaluates at least accessibility metadata;
executing a machine-implemented resolution logic that evaluates the visual-pattern label and the semantic-pattern label of the candidate UI element to determine an appropriate resolution action for the candidate UI element; and
when the resolution logic determines that a definitive behavioral pattern can be assigned to the candidate UI element, executing an accessibility test suite selected according to the definitive behavioral pattern.
2 . The method of claim 1 , wherein when the resolution logic determines that a definitive behavioral pattern of the candidate UI element is not certain, invoking an interactive-probing mechanism to determine a definitive behavioral pattern of the candidate UI element.
3 . The method of claim 2 , wherein the interactive-probing mechanism further comprises:
simulating input events directed to the candidate UI element; and
evaluating DOM mutations as a result of the simulated input events to determine a definitive behavioral pattern of the candidate UI element.
4 . The method of claim 1 , wherein when the resolution logic identifies at least inadequate semantics associated with the candidate UI element,
generating an accessibility violation signal without executing an accessibility test suite.
5 . The method of claim 1 , wherein the resolution logic is implemented using a contingency-based classification mechanism that encodes empirically derived relationships between visual-pattern labels, semantic-pattern labels, and behavioral analytics of various UI elements.
6 . The method of claim 5 , wherein the contingency-based classification mechanism is implemented using a multi-dimensional data structure that stores resolution rules derived from statistical analysis of UI behavior across a corpus of web pages.
7 . The method of claim 1 , further comprising
retrieving, by one or more processors, datasets of rendered web pages including rendered visual representations and corresponding DOM states;
computing, for a plurality of UI elements extracted from the datasets, respective visual-pattern labels using the trained visual-pattern detection model operating on rendered pixel data;
computing, for the plurality of UI elements, respective semantic-pattern labels using the semantic classification engine; and
storing representative pairs of computed visual-pattern labels and semantic-pattern labels in a multi-dimensional data structure that encodes the resolution logic for each pair.
8 . The method of claim 7 , wherein storing the representative pairs further comprises:
computing, for each pair, one or more statistical measures characterizing observed behavioral outcomes of the corresponding UI elements; and
classifying each pair according to a resolution category selected from a plurality of resolution categories, wherein each resolution category corresponds to a resolution action.
9 . The method of claim 7 , further comprising:
computing a component root for each UI element of the plurality of UI elements, wherein the component root represents a target component for accessibility testing; and
generating, in the multi-dimensional data structure, an alignment key, using the component root, to associate the visual pattern labels and semantic-pattern labels.
10 . A non-transitory computer-readable medium storing a set of instructions for resolving conflicting user-interface (UI) component classifications for accessibility testing, the set of instructions comprising:
one or more instructions that, when executed by one or more processing circuitries of a device, cause the device to:
determine, for a rendered user-interface component in a document object model (DOM), a component root for a candidate UI element using a tight-ancestor DOM traversal;
generate, using a trained visual-pattern detection model operating on rendered pixel data, a visual-pattern label for the component root;
generate, for the candidate UI element, a semantic-pattern label using a semantic classification engine that evaluates at least accessibility metadata;
execute a machine-implemented resolution logic that evaluates the visual-pattern label and the semantic-pattern label of the candidate UI element to determine an appropriate resolution action for the candidate UI element; and
when the resolution logic determines that a definitive behavioral pattern can be assigned to the candidate UI element, execute an accessibility test suite selected according to the definitive behavioral pattern.
11 . A system for resolving conflicting user-interface (UI) component classifications for accessibility testing comprising:
a processing circuitry;
a memory, the memory containing instructions that, when executed by the processing circuitry, configure the system to:
determine, for a rendered user-interface component in a document object model (DOM), a component root for a candidate UI element using a tight-ancestor DOM traversal;
generate, using a trained visual-pattern detection model operating on rendered pixel data, a visual-pattern label for the component root;
generate, for the candidate UI element, a semantic-pattern label using a semantic classification engine that evaluates at least accessibility metadata;
execute a machine-implemented resolution logic that evaluates the visual-pattern label and the semantic-pattern label of the candidate UI element to determine an appropriate resolution action for the candidate UI element; and
when the resolution logic determines that a definitive behavioral pattern can be assigned to the candidate UI element, execute an accessibility test suite selected according to the definitive behavioral pattern.
12 . The system of claim 11 , wherein when the resolution logic determines that a definitive behavioral pattern of the candidate UI element is not certain invoking an interactive-probing mechanism to determine a definitive behavioral pattern of the candidate UI element.
13 . The system of claim 12 , wherein the memory contains further instructions that, when executed by the processing circuitry for the interactive-probing mechanism, further configure the system to:
simulate input events directed to the candidate UI element; and
evaluate DOM mutations as a result of the simulated input events to determine a definitive behavioral pattern of the candidate UI element.
14 . The system of claim 11 , wherein when the resolution logic identifies at least inadequate semantics associated with the candidate UI element generating an accessibility violation signal without executing an accessibility test suite.
15 . The system of claim 11 , wherein the resolution logic is implemented using a contingency-based classification mechanism that encodes empirically derived relationships between visual-pattern labels, semantic-pattern labels, and behavioral analytics of various UI elements.
16 . The system of claim 15 , wherein the contingency-based classification mechanism is implemented using a multi-dimensional data structure that stores resolution rules derived from statistical analysis of UI behavior across a corpus of web pages.
17 . The system of claim 11 , wherein the memory contains further instructions which when executed by the processing circuitry further configure the system to:
retrieve, by one or more processors, datasets of rendered web pages including rendered visual representations and corresponding DOM states;
compute, for a plurality of UI elements extracted from the datasets, respective visual-pattern labels using the trained visual-pattern detection model operating on rendered pixel data;
compute, for the plurality of UI elements, respective semantic-pattern labels using the semantic classification engine; and
store representative pairs of computed visual-pattern labels and semantic-pattern labels in a multi-dimensional data structure that encodes the resolution logic for each pair.
18 . The system of claim 17 , wherein the memory contains further instructions that, when executed by the processing circuitry for storing the representative pairs, further configure the system to:
compute, for each pair, one or more statistical measures characterizing observed behavioral outcomes of the corresponding UI elements; and
classify each pair according to a resolution category selected from a plurality of resolution categories, wherein each resolution category corresponds to a resolution action.
19 . The system of claim 17 , wherein the memory contains further instructions which when executed by the processing circuitry further configure the system to:
compute a component root for each UI element of the plurality of UI elements, wherein the component root represents a target component for accessibility testing; and
generate, in the multi-dimensional data structure, an alignment key, using the component root, to associate the visual pattern labels and semantic-pattern labels.