Пример #1
0
        public override bool PassesTest(IA11yElement e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            if (!IsBoundingRectangleContained(e.Parent, e))
            {
                // if the element is not contained in the parent element, go further
                var container = e.FindContainerElement();

                return(IsBoundingRectangleContained(container, e));
            }

            return(true);
        }
Пример #2
0
        public override EvaluationCode Evaluate(IA11yElement e)
        {
            if (e == null)
            {
                throw new ArgumentException(nameof(e));
            }

            if (!IsBoundingRectangleContained(e.Parent, e))
            {
                // if the element is not contained in the parent element, go further
                var container = e.FindContainerElement();

                return(IsBoundingRectangleContained(container, e) ? EvaluationCode.Pass : EvaluationCode.Warning);
            }

            return(EvaluationCode.Pass);
        }