Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editing_style: :none not working properly with VoiceOver #653

Open
jamonholmgren opened this issue Mar 31, 2015 · 9 comments · Fixed by #678
Open

editing_style: :none not working properly with VoiceOver #653

jamonholmgren opened this issue Mar 31, 2015 · 9 comments · Fixed by #678
Labels

Comments

@jamonholmgren
Copy link
Owner

Per @austinseraphin's tweet: https://twitter.com/AustinSeraphin/status/582650809772568576

In table_data I specify editing_style: :none but VoiceOver still says Swipe to delete. What have I missed?
VoiceOver offers the delete action on PM’s table screen cells by default.

@austinseraphin
Copy link
Contributor

The problem happens because of the existence of the tableView:commitEditingStyle:forRowAtIndexPath: method. As long as it exists VoiceOver will falsely report the cell as deletable. Some metaprogramming might fix this. Oh.. except RubyMotion doesn't have define_method. Oh dear... Well there goes that idea.

@jamonholmgren
Copy link
Owner Author

We could extend the TableScreen instance with a module, something like this:

module ProMotion::Table::Deletable
  def tableView:commitEditingStyle:forRowAtIndexPath:  # <  i know this is wrong, in a hurry
  end
end

...

screen.extend(PM::Table::Deletable) if @deletable # whatever

@austinseraphin
Copy link
Contributor

Ah yes, much simpler. Yes, include the module if the table has any cells with an editing style of delete or insert.

@austinseraphin
Copy link
Contributor

Please see pull request #678

@squidpunch
Copy link
Contributor

👍

@markrickert
Copy link
Contributor

As per #690, including the tableView:commitEditingStyle:forRowAtIndexPath: in a extended module breaks actual deleting functionality. I'm pretty sure that it has to be included in the class when the class is loaded and not included modularly in order for the table cells to actually be deletable.

@markrickert
Copy link
Contributor

Based on https://gist.github.com/d-ronnqvist/3584ccf3379f9c318e4f I think i may have found a valid solution to this. @austinseraphin can you please check out the branch bug/690-edit-table and let me know if this works with accessibility?

@austinseraphin
Copy link
Contributor

Yes this works.

@austinseraphin
Copy link
Contributor

Perhaps unrelated, when I have the editing style set to insert it still says swipe to delete. I don’t know if this happens because of a VoiceOver bug or a bug in ProMotion. I’ll dig a little. But for now the regular cells don’t report any actions, the original point of this bug report.

On May 14, 2015, at 12:28 PM, Mark Rickert [email protected] wrote:

Based on https://gist.github.com/d-ronnqvist/3584ccf3379f9c318e4f https://gist.github.com/d-ronnqvist/3584ccf3379f9c318e4f I think i may have found a valid solution to this. @austinseraphin https://github.com/austinseraphin can you please check out the branch bug/690-edit-table and let me know if this works with accessibility?


Reply to this email directly or view it on GitHub #653 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants