Commit 7001577e67
Unsigned
Layout: unified · split
DomainDigUITests/AccessibilityAuditHarness.swift +4 −4
| @@ -184,10 +184,10 @@ enum AccessibilityAuditHarness { | |||
| 184 | // and the search field's hit region at accessibility sizes is the | 184 | // and the search field's hit region at accessibility sizes is the |
| 185 | // system's own control. Reading `elementType` here is safe; reading | 185 | // system's own control. Reading `elementType` here is safe; reading |
| 186 | // `frame` is not (it kills element attribution for the whole audit). | 186 | // `frame` is not (it kills element attribution for the whole audit). |
| 187 | if let type = issue.element?.elementType, type == .searchField || type == .textField { | 187 | if let type = issue.element?.elementType, |
| 188 | if issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { | 188 | type == .searchField || type == .textField, |
| 189 | return "system field placeholder/hit region, length-independent" | 189 | issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { |
| 190 | } | 190 | return "system field placeholder/hit region, length-independent" |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | // Unattributed clipped-text/dynamic-type findings. Bisection showed the | 193 | // Unattributed clipped-text/dynamic-type findings. Bisection showed the |
Scripts/audit-a11y.sh +6 −6
| @@ -43,14 +43,14 @@ DEPLOYMENT_TARGET=$( | |||
| 43 | | awk -F' = ' '/ IPHONEOS_DEPLOYMENT_TARGET = /{print $2; exit}' | 43 | | awk -F' = ' '/ IPHONEOS_DEPLOYMENT_TARGET = /{print $2; exit}' |
| 44 | ) | 44 | ) |
| 45 | 45 | ||
| 46 | if [ -z "${DEPLOYMENT_TARGET:-}" ]; then | 46 | if [[ -z "${DEPLOYMENT_TARGET:-}" ]]; then |
| 47 | echo "error: could not read IPHONEOS_DEPLOYMENT_TARGET" >&2 | 47 | echo "error: could not read IPHONEOS_DEPLOYMENT_TARGET" >&2 |
| 48 | exit 1 | 48 | exit 1 |
| 49 | fi | 49 | fi |
| 50 | 50 | ||
| 51 | DT_MAJOR="${DEPLOYMENT_TARGET%%.*}" | 51 | DT_MAJOR="${DEPLOYMENT_TARGET%%.*}" |
| 52 | DT_MINOR="${DEPLOYMENT_TARGET##*.}" | 52 | DT_MINOR="${DEPLOYMENT_TARGET##*.}" |
| 53 | [ "$DT_MINOR" = "$DEPLOYMENT_TARGET" ] && DT_MINOR=0 | 53 | [[ "$DT_MINOR" = "$DEPLOYMENT_TARGET" ]] && DT_MINOR=0 |
| 54 | FLOOR_RANK=$(( DT_MAJOR * 1000 + DT_MINOR )) | 54 | FLOOR_RANK=$(( DT_MAJOR * 1000 + DT_MINOR )) |
| 55 | 55 | ||
| 56 | echo " deployment target: $DEPLOYMENT_TARGET (rank $FLOOR_RANK)" | 56 | echo " deployment target: $DEPLOYMENT_TARGET (rank $FLOOR_RANK)" |
| @@ -82,7 +82,7 @@ run_tier() { | |||
| 82 | local sim udid label | 82 | local sim udid label |
| 83 | 83 | ||
| 84 | sim=$(select_sim "$which") | 84 | sim=$(select_sim "$which") |
| 85 | if [ -z "$sim" ]; then | 85 | if [[ -z "$sim" ]]; then |
| 86 | echo "error: no iPhone simulator at or above iOS $DEPLOYMENT_TARGET installed" >&2 | 86 | echo "error: no iPhone simulator at or above iOS $DEPLOYMENT_TARGET installed" >&2 |
| 87 | echo "hint: install one with 'xcodebuild -downloadPlatform iOS'" >&2 | 87 | echo "hint: install one with 'xcodebuild -downloadPlatform iOS'" >&2 |
| 88 | return 1 | 88 | return 1 |
| @@ -94,7 +94,7 @@ run_tier() { | |||
| 94 | echo | 94 | echo |
| 95 | echo "==> $which: $label" | 95 | echo "==> $which: $label" |
| 96 | 96 | ||
| 97 | if [ "$which" = "floor" ] && [ "$(echo "$sim" | jq -r .rank)" -ge $(( (DT_MAJOR + 1) * 1000 )) ]; then | 97 | if [[ "$which" = "floor" ]] && [[ "$(echo "$sim" | jq -r .rank)" -ge $(( (DT_MAJOR + 1) * 1000 )) ]]; then |
| 98 | echo " NOTE: nearest installed runtime is a major version above the $DEPLOYMENT_TARGET" | 98 | echo " NOTE: nearest installed runtime is a major version above the $DEPLOYMENT_TARGET" |
| 99 | echo " deployment target, so this is not true floor coverage." | 99 | echo " deployment target, so this is not true floor coverage." |
| 100 | fi | 100 | fi |
| @@ -113,7 +113,7 @@ run_tier() { | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | status=0 | 115 | status=0 |
| 116 | if [ "$TIER" = "both" ]; then | 116 | if [[ "$TIER" = "both" ]]; then |
| 117 | run_tier floor || status=1 | 117 | run_tier floor || status=1 |
| 118 | run_tier current || status=1 | 118 | run_tier current || status=1 |
| 119 | else | 119 | else |
| @@ -121,7 +121,7 @@ else | |||
| 121 | fi | 121 | fi |
| 122 | 122 | ||
| 123 | echo | 123 | echo |
| 124 | if [ "$status" -eq 0 ]; then | 124 | if [[ "$status" -eq 0 ]]; then |
| 125 | echo "==> Done. Findings above are the burndown list for issue #21." | 125 | echo "==> Done. Findings above are the burndown list for issue #21." |
| 126 | echo " They are reported, not enforced — widen" | 126 | echo " They are reported, not enforced — widen" |
| 127 | echo " AccessibilityAuditHarness.enforcedAuditTypes as each phase lands." | 127 | echo " AccessibilityAuditHarness.enforcedAuditTypes as each phase lands." |