diff options
| -rw-r--r-- | DomainDigUITests/AccessibilityAuditHarness.swift | 8 | ||||
| -rwxr-xr-x | Scripts/audit-a11y.sh | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/DomainDigUITests/AccessibilityAuditHarness.swift b/DomainDigUITests/AccessibilityAuditHarness.swift index 24f900e..58583e1 100644 --- a/DomainDigUITests/AccessibilityAuditHarness.swift +++ b/DomainDigUITests/AccessibilityAuditHarness.swift @@ -184,10 +184,10 @@ enum AccessibilityAuditHarness { // and the search field's hit region at accessibility sizes is the // system's own control. Reading `elementType` here is safe; reading // `frame` is not (it kills element attribution for the whole audit). - if let type = issue.element?.elementType, type == .searchField || type == .textField { - if issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { - return "system field placeholder/hit region, length-independent" - } + if let type = issue.element?.elementType, + type == .searchField || type == .textField, + issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { + return "system field placeholder/hit region, length-independent" } // Unattributed clipped-text/dynamic-type findings. Bisection showed the diff --git a/Scripts/audit-a11y.sh b/Scripts/audit-a11y.sh index 9ac3aa0..9119fd7 100755 --- a/Scripts/audit-a11y.sh +++ b/Scripts/audit-a11y.sh @@ -43,14 +43,14 @@ DEPLOYMENT_TARGET=$( | awk -F' = ' '/ IPHONEOS_DEPLOYMENT_TARGET = /{print $2; exit}' ) -if [ -z "${DEPLOYMENT_TARGET:-}" ]; then +if [[ -z "${DEPLOYMENT_TARGET:-}" ]]; then echo "error: could not read IPHONEOS_DEPLOYMENT_TARGET" >&2 exit 1 fi DT_MAJOR="${DEPLOYMENT_TARGET%%.*}" DT_MINOR="${DEPLOYMENT_TARGET##*.}" -[ "$DT_MINOR" = "$DEPLOYMENT_TARGET" ] && DT_MINOR=0 +[[ "$DT_MINOR" = "$DEPLOYMENT_TARGET" ]] && DT_MINOR=0 FLOOR_RANK=$(( DT_MAJOR * 1000 + DT_MINOR )) echo " deployment target: $DEPLOYMENT_TARGET (rank $FLOOR_RANK)" @@ -82,7 +82,7 @@ run_tier() { local sim udid label sim=$(select_sim "$which") - if [ -z "$sim" ]; then + if [[ -z "$sim" ]]; then echo "error: no iPhone simulator at or above iOS $DEPLOYMENT_TARGET installed" >&2 echo "hint: install one with 'xcodebuild -downloadPlatform iOS'" >&2 return 1 @@ -94,7 +94,7 @@ run_tier() { echo echo "==> $which: $label" - if [ "$which" = "floor" ] && [ "$(echo "$sim" | jq -r .rank)" -ge $(( (DT_MAJOR + 1) * 1000 )) ]; then + if [[ "$which" = "floor" ]] && [[ "$(echo "$sim" | jq -r .rank)" -ge $(( (DT_MAJOR + 1) * 1000 )) ]]; then echo " NOTE: nearest installed runtime is a major version above the $DEPLOYMENT_TARGET" echo " deployment target, so this is not true floor coverage." fi @@ -113,7 +113,7 @@ run_tier() { } status=0 -if [ "$TIER" = "both" ]; then +if [[ "$TIER" = "both" ]]; then run_tier floor || status=1 run_tier current || status=1 else @@ -121,7 +121,7 @@ else fi echo -if [ "$status" -eq 0 ]; then +if [[ "$status" -eq 0 ]]; then echo "==> Done. Findings above are the burndown list for issue #21." echo " They are reported, not enforced — widen" echo " AccessibilityAuditHarness.enforcedAuditTypes as each phase lands." |
