Code Monkey home page Code Monkey logo

capable's People

Contributors

acosmicflamingo avatar chrs1885 avatar chrwendt avatar edwellbrook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capable's Issues

Add fullKeyboardAccess feature on macOS

What kind of feature would you like to see?

When using the Accessibility Inspector for a macOS app, there seems to be another accessibility setting called FullKeyboardAccess.

How does it work in detail?

Use the .voiceOver feature as a reference. While notifications do not seem to be available for this accessibility feature, the current status can be requested by using the isFullKeyboardAccessEnabledproperty: https://developer.apple.com/documentation/appkit/nsapplication/1428469-isfullkeyboardaccessenabled

What does the API look like?

The enum value for this feature should be .fullKeyboardAccess.

Any existing projects that do something similiar?

none

Further readings:

Drop fonts module

Since I'm planning iOS 10 support entirely, people can use FontMetrics (>= iOS 11) directly.

Need FullKeyboardAccess Check for iOS

What kind of feature would you like to see?

I would like to see a feature to check, if "Full Keyboard Access" is turned on iOS.

How does it work in detail?

Feature can check if "Full Keyboard Access" is turned on in Settings > Accessibility > Keyboards on iOS.

What does the API look like?

It would look like:
let capable = Capable(withFeatures: [. fullKeyboardAccess])
let isFeatureEnabled: Bool = capable.isFeatureEnable(feature: . fullKeyboardAccess)

Just the way it works on MacOS. I've tried it on a MacOS destination target and that is exactly what I want and need for iOS.

Any existing projects that do something similiar?

Nothing found..
Would appreciate any explanation or tips, what's the difference between MacOS and iOS just for understanding.

Refactor Capable feature to support plugin based approach

Rather than having a single wrapper class for all accessibility settings, rewrite the framework to support a more plugin based approach. This will make it easier (possible) to maintain it. Also, upcoming accessibility settings can easily be provided by new contributors without having them to know anything about the framework's architecture.

Capable framework appearing in scheme when it doesn't need to

I noticed that the Capable framework appears in the list of schemes when it is added as a SPM dependency when I don't think should be there:
image
I believe this can be fixed by simply adding .swiftpm to .gitignore (which Point Free had done to address the issue with the Composable Architecture repo: pointfreeco/swift-composable-architecture#1371 & pointfreeco/swift-composable-architecture#1378). However, I don't know if Capable can take this same approach because the file appears in several places (specifically in BuildTools).

Capable framework not found in Example application

Currently the example application can not be run out-of-the-box. At the current state the application will show an error when compiling that it "cannot find Capable". I think the product of the included Xcode project should either be linked in the "Linked Binaries With Libraries" phase or should be included via Carthage/Cocoapods. The first approach might be more useful since this way the iteration of the Example project could be a lot quicker.

New Handicap type for client-side grouping of accessibility features

What kind of feature would you like to see?

Client-side grouping of accessibility features by introducing a new type called Handicap.

How does it work in detail?

Today, the framework instance can be initialized by passing in specific accessibility features you are interested in. You can then use this data to send user properties to your backend and add the logic for user segregation there.

I'd like to optionally move this logic to the client by adding certain accessibility features to a Handicap instead. Furthermore, you can define if all features of a Handicap need to be enabled to also set the Handicap's status to enabled. Like with CapableFeatures, you can initialize the framework by using Handicaps and register them as user properties.

What does the API look like?

To initialize the Capable instance with a Handicap you can call:
init(withFeatures features: [CapableFeature], name: String, mode: HandicapMode)

The HandicapMode enum types specifies if either all features need to be enabled to set the Handicap to enabled as well or if only one is sufficient.

The name param defines the identifier, which can be used to retrieve the handicaps status at any point. It also represents the Handicap within the statusMap property value.

Any existing projects that do something similiar?

none

Support caption color calculation for background images

What kind of feature would you like to see?

Calculate high contrast text color for specific areas of a given background image.

How does it work in detail?

Get average color of the requested image area. Calculate the high contrast text color based on that color.

What does the API look like?

class func getTextColors(onBackgroundImage image: Image, imageArea: ImageArea = .full) -> Color? {

Any existing projects that do something similiar?

Add WCAG colors extension

What kind of feature would you like to see?

The Web Content Accessibility Guidelines (WCAG) define best practices for colors used on websites. These guidelines could easily be used to define a WCAG extension on UIColor.

How does it work in detail?

I'm not too sure about all requirements, yet, so I'm looking for some suggestions. Here is what I came up with initially.

Expose functions to get:

  • The contrast ratio for a pair of colors
  • A high contrast foreground color for a given background color (white, black, or the first match from a given list of colors)
  • A high contrast background color for a given background color (white, black, or the first match from a given list of colors)
  • A high contrast foreground color for a given background image (white, black, or the first match from a given list of colors)

The contrast requirements are based on the text size, background alpha, level of conformance, and font weight.

See https://webaim.org/articles/contrast/

What does the API look like?

We need to create a UIColor extension meeting the requirements above. The function names and params are up to the author. We also need to create a separate subspec and extend the existing example projects with a new screen to showcase this feature.

Any existing projects that do something similar?

I've seen one project that exposes an API to calculate the contrast ratio for a given color pair: https://github.com/soffes/Color

Remove Handicaps feature

The idea of this feature was to identify a user's handicap by checking if one or more accessibility features are currently enabled. You could then replace certain parts of your UI to actually improve it based on this info. However, I decided to focus on wrapping more accessibility feature APIs in the future rather than providing features only a small group of devs are using.

Create dedicated lib for color extensions

Since most old feature have been removed from Capable 2.0, the main purpose of the framework should be focusing on an unified accessibility API. The WCAG color extension should be moved to its own library project.

Add font overview to watch example

Currently, the watch example app only contains a feature statuses view. A second screen should be added since .largerTextis available for watchOS as well.

Support iOS 13 accessibility settings

What kind of feature would you like to see?

iOS 13 is going to introduce new accessibility settings such as

  • isOnOffSwitchLabelsEnabled: Bool
  • isVideoAutoplayEnabled: Bool
  • isOnOffSwitchLabelsEnabled: Bool

Also check for new APIs for other platforms.

Replace allValues with CaseIterable allCases

With Swift 4.2 (see Proposal SE-0194) a new protocol is introduced called CaseIterable which automatically generates all available cases for an enum. This way the allValues method could be deleted. However I guess we have to wait for the new Xcode 10 to try this new language feature. Whenever I get my hands on the new beta I am happy to help with a PR. I just wanted to open an issue in order to document this.

Article/tutorial on user segregation (Capable & Firebase)

What kind of feature would you like to see?

The vision for using this framework is not clear, yet. We could provide an article on how to use Capable together with Firebase Analytics to:

  • Basic usage of the Capable framework
  • User segregation: How many app users do have handicaps
  • Capable status meets custom events: Where in your app flow do people with certain handicaps get stuck
  • DSGVO: Is it allowed to send this kind of data anonymously?

How does it work in detail?

Publish the article as part of the repo docs and on Medium.

What does the API look like?

Any existing projects that do something similiar?

Support debug logging

What kind of feature would you like to see?

When a debugger is attached, I'd like to see logs about certain events (e.g. initializations, notifications) produced by the Capable framework. Furthermore, it would be great expose an API to set my own logger implementation.

How does it work in detail?

By default, the framework uses the default logger implementation build upon os.log. If the debugger is attached, this will log different events (verbose, info, warning, error) coming from the framework code to the console.

If the dev needs to provide her own logger implementation, she can do so by providing a closure.

Also, setting a minimum log level should be supported: if the dev only wants the Capable framework to log warning or errors, she needs to set the log level to warnings.

What does the API look like?

Custom log closure

var log: (message: String, logLevel: OSLogType) -> () = { message, logLevel in
   MyCustomLogger.logToFile(component: "Capable", message: message, type: logLevel)
}

let capable = Capable()
capable.onLog = log
capable.logLevel = OS_LOG_TYPE_INFO

Any existing projects that do something similar?

Most SDKs.

Provide contribution guidelines

What kind of feature would you like to see?

As a contributor, I'd like to find some guidelines on how to contribute code to the Capable framework.

How does it work in detail?

Add a contributors.md containing the following info:

  • Checkout project
  • Install tools used by the project
  • Create feature branches and pull requests (git-flow)
  • Test coverage
  • Code of conduct

What does the API look like?

Any existing projects that do something similar?

Pretty much all OS projects.

Add feature hearingDevice on iOS

What kind of feature would you like to see?

Users can pair ear aid devices with an iPhone/iPad. The framework could provide the current status as well as send out notifications if the status changes.

How does it work in detail?

The current pairing status can be retrieved by using the hearingDevicePairedEar property (left, right, both, nil). If the value changes, the hearingDevicePairedEarDidChangeNotification is sent out.

See https://developer.apple.com/documentation/uikit/uiaccessibility/1648477-hearingdevicepairedear

What does the API look like?

The API will look pretty much the same as for other features. However, if a device is paired its status will be either left, right, or both. If no device is connected it will be disabled. Therefore, we are going to need some kind of mapping between UIAccessibility.HearingDeviceEar and String.

Any existing projects that do something similiar?

๐Ÿคทโ€โ™‚๏ธ

Cannot install via Carthage anymore for 1.1.1

What did you do?

I was trying to install Capable 1.1.1 by using Carthage.

What did you expect to happen?

Carthage should be able to build Capable as per 1.1.0 and before.

What happened instead?

I got this error message:

Dependency "Capable" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/chrs1885/Capable/issues/new

I found that Capable.xcodeproj was removed since 11.1.1 in cd49b00, I believe this is the cause of the issue.

Setup

  • Added this in the Cartfile
github "chrs1885/Capable"
  • Run the command
carthage update --platform iOS

Add notifications for accessibility feature changes on macOS

What kind of feature would you like to see?

Add notifications for accessibility features that are missing a notification.

How does it work in detail?

While Capable does provide notifications for all accessibility features on iOS and tvOS, it doesn't provide any on macOS, yet. However, by listening to the NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification we can get informed about changes of accessibility settings.

What does the API look like?

none

Any existing projects that do something similar?

none

Build error while importing Capable 2.0.0 using SPM

Please fill out all lines starting with a ๐Ÿ“ when filing a bug to give us an idea of what exactly went wrong.

What did you do?

๐Ÿ“ Impoorting Capable using SPM, at version 2.0.0

What did you expect to happen?

๐Ÿ“ The project to build successfully ๐Ÿ˜…

What happened instead?

๐Ÿ“ Error when DifferentiateWithoutColor observation is created, on iOS platforms :
Screenshot 2022-02-06 at 18 41 56
The NSNotification.Name(rawValue:) wrapping is too much, just use directly UIAccessibility.differentiateWithoutColorDidChangeNotification for observer.

Setup

๐Ÿ“ Just import Capable 2.0.0 using SPM.

CocoaPods subspec for UIFontMetrics/UIFont extension

What kind of feature would you like to see?

Devs who would like to integrate Capable for autoscaling fonts within their apps might not want to use the whole pod but the extension code instead. CocoaPods supports subspecs to only distribute certain parts of the framework.

How does it work in detail?

Add extension subspec to the podspec.

What does the API look like?

Any existing projects that do something similiar?

PromiseKit

Fix CocoaPods documentation link

What did you do?

I was visiting the Capable CocoaPods page. Then, I was clicking the documentation link.

What did you expect to happen?

See the Jazzy HTML documentation generated for the Capable framework.

What happened instead?

The documentation link was giving me an error page.

Setup

none

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.