We recommend using `initWithDefaults` and we should follow the recommendation. This change removes all usage of `init` within MDC components in order to let us remove that initializer from the public surface.
PiperOrigin-RevId: 302958447
This change connects the recently-added "dismiss" affordance to an action that
allows UIAccessibility to reject the Feature Highlight. In #8959, a
discoverable affordance was added to Feature Highlight so UIAccessibility
would present dismiss options more easily to users. That change did not
include connecting the view to any action or gesture recognizer, so users
could discover a "dismiss" button but nothing happened when it was activated.
This change does the following:
* Changes the dismiss view to a UIButton. There were complications when
attempting to add another gesture recognizer to the view hierarchy and a
UIButton was a simpler solution.
* Sets the layout frame of the dismiss view to `{0, 0, 1, 1}`, creating a
nearly-invisible clear view in the upper-left corner of the screen. The
`accessibilityFrame` is set to match
the Feature Highlight's bounds, which presents the affordance to
UIAccessibility in a manner similar to a Scrim. This is necessary to
avoid introducing accidental "reject" taps if the user pressed on the
Feature Highlight itself.
Closes#9450
Pull request #8959 changed the accessibility behavior of Feature Highlight but
did not update the tests. Somehow the last commit in the PR failed CI tests,
but the PR itself was marked as passing. This commit updates the unit tests
to reflect the latest behavioral expectations for accessibility.
Follow-up for #8961
Currently the feature highlight didn't have a proper dismiss affordance when voiceover is on.
It will instead speak a hint of "double tap to dismiss" on the title but without allowing the user to dismiss even when double tapped.
This adds a dismiss affordance and passes the accessibility hint to dismiss to that view.
Frame of dismissal button in VO:

Closes#8961#8888#8884#8886#8885
This PR adds adjustsFontForContentSizeCategory property to MDCFeatureHighlightViewController, allowing clients to have their scalable fonts adjust based on content size category changes.
Due to FeatureHighlight using an attributedText to set up the text for its labels, for the scalable fonts to adjust properly, the attributedText needs to have the font as an attribute. This is an interesting gotcha that was found while working on this PR.
Closes#8634
Adds a traitCollectionDidChangeBlock to MDCFeatureHighlightViewController and MDCFeatureHighlightView, called when its trait collection changes.
Additionally this moves the FeatureHighlightView test to a more generic name, instead of FeatureHighlightNoopTests they were moved to FeatureHighlightViewTests.
Closes#8050
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.