Comments (8)
Ah, it looks like the iOS Accessibility Programming Guide explains (inc. sample code) how to make the contents of custom container views accessible. Unfortunately we don't have any Obj-C expertise in-house to try out this implementation.
from phfcomposebarview.
Hey @jamesbebbington. Sorry, but I don't have the capacity to implement this change.
from phfcomposebarview.
Hey @jamesbebbington, I've looked a bit into this and the UIAccessibilityContainer
protocol. I changed the container that contains the text view from a button to a normal view. Would you mind testing with the improve-accessibility
branch, specifically this commit? 28a3b5c
Thanks!
from phfcomposebarview.
Thanks @fphilipe, much appreciated.
UI tests can now address the text view, however I'm seeing some strange behaviour when programatically entering text. Given this UI Test case:
import XCTest
class PHFComposeBarViewExampleUITests: XCTestCase {
override func setUp() {
super.setUp()
continueAfterFailure = false
}
func testComposeBar() {
let app = XCUIApplication()
app.launch()
app.staticTexts["PHFComposeBarPlaceholderLabel"].tap()
app.textViews["PHFComposeBarTextView"].typeText("Here is some sample text. It's a few lines long but not too long. I think that should do it.")
app.buttons["PHFComposeBarUtilityButton"].tap()
sleep(5)
}
}
the entered text is being partially erased as it's entered:
Oh and a default accessibility identifier for the placeholder label would be helpful, so it's easier to address in tests when the app is localised.
EDIT: I forgot that I had set the accessibility identifiers in the the example app. Test code above updated and pushed in new ui-tests-2
branch.
Thanks!
from phfcomposebarview.
I've pushed a couple of updates to the ui-tests-2 branch, fixing the misnamed buttons and adding a (failing) assert that checks that the entered message was properly saved.
from phfcomposebarview.
@jamesbebbington thanks! I've added a commit introducing a test (based on yours). I was not able to reproduce your erasing text problem you showed in the GIF.
I'm wondering if the accessibility identifiers should be set directly in PHFComposeBarView
or if it should be up to the consumer of it to set it (as you did and I've taken over).
From my side this would be ready. Let me know if this works for you.
from phfcomposebarview.
Cheers @fphilipe, will take a look now.
I'm wondering if the accessibility identifiers should be set directly in PHFComposeBarView or if it should be up to the consumer of it to set it (as you did and I've taken over).
I don't think it matters too much either way, as long as consumers can set them. I think it's probably fine to leave them unset, as I'd imagine anyone who wanted to use them would want to rename them anyway.
from phfcomposebarview.
I was not able to reproduce your erasing text problem you showed in the GIF.
Yeah, it's an odd one, it seems a bit intermittent.
I integrated the improve-accessibility
branch into our app and ran tests on iPhone 4s, 5, 6 & 6 Plus across four different languages and they were all fine, so not really sure what's going on with that.
Let me know if this works for you.
Yup, many thanks @fphilipe!
from phfcomposebarview.
Related Issues (20)
- keyboard hide textfield HOT 3
- Mutliline text is cut HOT 3
- Unable to scroll to caret after inserting NSTextAttachment in textView HOT 1
- Keyboard covers text field HOT 1
- Resign First Responder not working with Swift HOT 4
- Implement via Swift? HOT 1
- setMaxCharCount not function well HOT 1
- White view over the UITextView not showing the entered text HOT 5
- Attachment cancel button on image of NSTextAttachment
- Attachment cancel button on image of NSTextAttachment HOT 1
- Globally selected text & Image paste HOT 5
- Regarding Default size increase when load composebar HOT 6
- UIBarStyleBlackTranslucent? HOT 2
- ComposeBar frame update issue using Autolayout update ? HOT 1
- Compose bar doesn't respond to paste board HOT 1
- Not working properly on iOS 11, Xcode 9 HOT 7
- How To Use PHFComposeBarView control in Table View Cell.. HOT 1
- Conflict with IQKeyboardManager HOT 1
- Not working properly on iPhone X/XS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phfcomposebarview.