Ejemplo n.º 1
0
        /// <summary>
        /// Gets information referring to the guideline from which a rule was derived.
        /// </summary>
        /// <param name="a11yCriteria"></param>
        /// <returns>Always returns empty strings, not null strings.</returns>
        public static (string ShortDescription, string Url) GetGuidelineInfo(A11yCriteriaId a11yCriteria)
        {
            var link = GetReferenceLink(a11yCriteria.ToString());

            if (link == null)
            {
                return(string.Empty, string.Empty);
            }

            return(link.ShortDescription ?? string.Empty,
                   TryGetValidUrl(link.Uri, out string url) ? url : string.Empty);
        }
Ejemplo n.º 2
0
        public static string GetStandardName(A11yCriteriaId criteriaId)
        {
            switch (criteriaId)
            {
            case A11yCriteriaId.AvailableActions:
                return(DefaultGuidelineShortDescriptions.AvailableActions);

            case A11yCriteriaId.InfoAndRelationships:
                return(DefaultGuidelineShortDescriptions.InfoAndRelationships);

            case A11yCriteriaId.Keyboard:
                return(DefaultGuidelineShortDescriptions.Keyboard);

            case A11yCriteriaId.NameRoleValue:
                return(DefaultGuidelineShortDescriptions.NameRoleValue);

            case A11yCriteriaId.ObjectInformation:
                return(DefaultGuidelineShortDescriptions.ObjectInformation);
            }

            return(DefaultGuidelineShortDescriptions.None);
        }