Fresh 2.1 installation
More than one issue:
Steps to reproduce
Configure a product with swatch attributs e.g size and color
Set some quantity to 0, or leave it empty, for child products. (Is it correct that they are automatically saved as virtual product instead simple ones?)

First Issue
On Catalog product page
Expected result
Clicking on a color swatch, the size swatch(es) related to product(s) out of stock must be disabled (if it helps, before 2.10 it runs).
Same expected result when selecting the size swatch(es) (must disable color swatches for out of stock products related to that size)
Actual result
All swatches are selectable also if products are out of stock.

in the example above, S and L sizes must be disabled..
Second issue:
On catalog product page:
Steps to reproduce
Select Color and size swatches and add the product to the cart.
Expected result
The product is added to the cart from catalog page.
Actual result
Clicking on add to cart button opens the product page and a message show that you have to choose options as color and size in the example also if you already selected in the catalog page.
.

Third issue:
As the first issue described for catalog page, it happens also in product page: Clicking on color does not disable size for product(s) out of stock. Same for size versus color.

Hi @PierAlex
Thanks for reporting! As for "Second issue" we already have internal ticket #MAGETWO-47017 to fix this. As for other issues - I have created one more internal ticket #MAGETWO-58328 for fix. This issue will be closed after fixes.
Have a good day!
Fixed under MAGETWO-47017 ticket.
Hello @rganin
You closed this issue but there is another ticket referenced to this issues:
Is it also fixed?
Thanks.
Hello @rganin , we are experiencing the issue described in #MAGETWO-58328 where out of stock swatch options are not disabled/struck through, is there any word on the progress of this issue?
Version: 2.1.2 Community
Behavior: Swatch options matching out of stock simple products are enabled and selectable. Behavior persists regardless of setting for admin configuration Catalog > Inventory > Display Out of Stock Products.
Thank you.
-- EDIT: Update: Just upgraded to 2.1.4 and this issue is resolved. Thank you.
Hi, it seems Magento 2.2.0 still having this issue of displaying text swatches when products out of stock, following by the notification message "You need to choose options for your item.".
Is there a way to see the 2.1 fix, so I can apply it temporary in to my site?
Thank you.
Confirm that under Magento 2.2.0 the bug is still present.
Hope to be fixed quickly or alternatively to find a fix...
Painful...
On our site, it ONLY works when product has 1(one) configurable attribute, in example: (Size: _S, M, X, XL_). So, when Medium out of stock, it will completely hide the swatch text.
But, once you add 2nd attribute (Colors: _White, Red, Black_), and of of those combo products out of stock (XL > Red), it still allows user to select the combo, but once user clicks "Add to Cart", message comes up saying "You need to choose options for your item."
Now, the only time swatch text disabled and shows cross-bar, is when you dissociate this out of stock (XL > Red) from configurable product, or completely delete this simple product from the system. Then, once user clicks on XL, Red color will be disabled.
So, I kind of already assuming that Magento dev not going to fix this issue, because when they trying to replicate this bug, they probably either not adding 2nd attribute, or testing the part which is not broken, or maybe because it not 100% broken.
So, all we got left to do is appreciate the free open source software, and hope one day one of the smart developers will find the fix and commit it to the magento git project.
Fixed for 2.2.0 with this https://github.com/mjankiewicz/MagentoConfigurableProduct
Can confirm @LAccorinti's extension fixes the issue for version 2.2.2